The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Sun Nov 18, 2018 12:07 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Tue Jul 05, 2005 8:08 pm 
Offline
Black Belt 1st Degree
Black Belt 1st Degree

Joined: Wed Mar 14, 2001 1:01 am
Posts: 1344
Toby B. wrote:
But like the $add_images, I need to have it work so that if there is no links to place there (such as front panel pinouts, etc.), it shows as or None...


like i said, i don't know php or the totality of the code but if i understand it properly could you not expand the php to encompass the whole html line and use an if statement to decide whether or not the line should be there?

so if there is nothing entered for front panel pinouts, that variable remains in it's initialized state($frontpanelpins = "unknown" or "null" or whatever). once you get to the point of whether or not to display the link, use if to check if $frontpanelpins has changed. if it has changed(hopefully to something useful and not just a " " space character) then you continue with your link code. if it remains the same or is blank then you just skip over the whole link section.

in a php source, does all explicitly written html get processed? when i mentioned expanding the php around the link i meant something like using php to write the whole link line. so instead of:

[fake code]
html + php: $variable :end php + html
[/fake code]

could you?:

[fake code]
php: insert html tag + $variable + html closing tag :end php
[/fake code]

you could make it into a seperate function or module. at that point in the code, send the variable to the function, have the function receive it as a value or data only so it can work on it in it's own temporary variable. the if decision statement in the function will decide whether to write out the link or just skip it and throw control back to where it left off. this is assuming php has functions and modules and has differing ways of sending arguments to them.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 05, 2005 8:20 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14303
Location: Maine
I think this is going to have to hold off til MoboCop gets back... I am completely lost.... :roll:

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 3:50 am 
Offline
Black Belt 2nd Degree
Black Belt 2nd Degree

Joined: Tue Jun 29, 2004 9:05 am
Posts: 2792
Location: St. Augustine, Fl
Toby B. wrote:
This code is easy for me to understand since I wrote it. I am trying to make it easier for others who may or may not choose to assist me in building my site...

I think he means me
I can understand it just fine :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 5:08 am 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14303
Location: Maine
kltsin wrote:
Toby B. wrote:
This code is easy for me to understand since I wrote it. I am trying to make it easier for others who may or may not choose to assist me in building my site...

I think he means me
I can understand it just fine :)


You and who ever else Keith... :wink:

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 6:24 am 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14303
Location: Maine
ok I made a tiny bit of progress, but still not there yet...

Code:
<?php
if ($add_images == None) {
   echo "None";
} else {
   echo '<a href\="$add_images"\>$ai_descript</a>';
   }
?>


http://www.ctechinfo.org/test/zz-top/zz-top.html

Now I just need to figure out how to ativate that link... Another 12 hours of playing with code I might actually get it..... :roll:

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 8:09 am 
Offline
Black Belt 1st Degree
Black Belt 1st Degree

Joined: Wed Mar 14, 2001 1:01 am
Posts: 1344
i think that's about as far as i'll be able to try to help in this situation(unless i go take a php course in that place with all the books and hot chicks).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 8:23 am 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14303
Location: Maine
No problem, I do appreciate the help.. MoboCop should be able to tell me what I am doing wrong when he gets back...

Till then I will just continue to blow up code... 8O

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 8:54 am 
Offline
Black Belt 2nd Degree
Black Belt 2nd Degree

Joined: Tue Jun 29, 2004 9:05 am
Posts: 2792
Location: St. Augustine, Fl
Okay I see this in the template1.tpl
could it be a missing quote issue?
***************************
what about trying this
Code:
   echo "<a href\=""$add_images"\">$ai_descript</a>"";

read somewhere about adding comas or periods but dont know what they do.
example of what i have seen
Code:
   echo "<a href\="",$add_images,"\">$ai_descript</a>"";

wait im pulling this out my buttocks...
editted post so i can see side by side


Last edited by kltsin on Wed Jul 06, 2005 7:30 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 9:17 am 
Offline
Black Belt 2nd Degree
Black Belt 2nd Degree

Joined: Tue Jun 29, 2004 9:05 am
Posts: 2792
Location: St. Augustine, Fl
never mind about that... i was looking at wrong thing... duh

where do you have $ai_descript setup.. I didn't see it anywhere else..


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 06, 2005 6:20 pm 
Offline
Lead Mobo-fu Master
Lead Mobo-fu Master

Joined: Sun Dec 16, 2001 1:01 am
Posts: 14303
Location: Maine
$ai_descript is a new addition to the zz-top test page. It referers to $add_images description (shortened of coarse)...

Quote:
But what about this when I dl the whole page (as if I didnt have admin access) here is what shows.
I was messing around with the code all morning before work. Got it partially working as you can see, but its still not right..

I have referrenced all the books I can to figure this one out and still not figured it out.. :roll:

_________________
Compaq-Fu Master
Ctechinfo funding drive information


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group