|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
how? I know i cant use straight html, because that gives parse errors. I'd like to use the customboxpal's to display a few adverts with my sidebar mod. ButI dont know how to code it! Also, the menupal, the links dont work, how can i amend them? I looked at the code but cant figure it out.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
well just enclose the html in a echo " <insert html here>"; and any quotes " in the html code just escape out by preceding them with a \ se post https://www.ubbdev.com/forum/showflat...5/o/all/fpart/1
|
|
|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
Joined: May 2003
Posts: 1,068 |
You can use HTML in a palbox, scroungr wrote up a great example of how to do it Here even though this example is used for javascript its the same prinicipal, just make sure there is a backslash before all special characters in the link and it will parse out properly.
|
|
|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
Joined: May 2003
Posts: 1,068 |
LOL.. jinx scroungr, you owe me a coke 
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
$TempStorage .= echo"<a onclick="javascript:window.open('http://www.ultimatetopsites.com/bin/topsite.cgi?ford&cat=kewl&ID=152');" href="javascript:void(0);">Click Here to Vote for MEG!</a>";
can you spot why this isnt working? i get a parse error.
|
|
|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
Joined: May 2003
Posts: 1,068 |
Try this
echo "<a onclick="javascript:window.open('http://www.ultimatetopsites.com/bin/topsite.cgi?ford&cat=kewl&ID=152');" href="javascript:void(0);">Click Here to Vote for MEG!</a>";
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
just to double check i've understood correctly [] // Check and see if we need update cache if ((!$LastCacheTime) || (!$CustomBox2Data) || ($LastCacheTime < ($date - ($custombox2cache * 60)))) { $TempStorage = "";// Leave this blank and add to the string all // information that is to be displayed in the box echo "<a onclick="javascript:window.open('http://www.ultimatetopsites.com/bin/topsite.cgi?ford&cat=kewl&ID=152');" href="javascript:void(0);">Click Here to Vote for MEG!</a>"; "; /* Write what ever functions and routines you want and have them store all information into the above string for storage to the cache string. The information will be echoed out to the browser at the end of this script. */ [/] it still doesnt work  got a parse error on a different line now, line 52 which is this []echo "$tbopen<tr><td align="left" class="tdheader">"; // Table Start [/]
|
|
|
|
Joined: Jan 2003
Posts: 125
Journeyman
|
Journeyman
Joined: Jan 2003
Posts: 125 |
we've added in phpmyadsnew on our sidebox, it works very well for serving up and tracking banners, you should check it out.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
here try this
echo "<a onclick="javascript:window.open('http://www.ultimatetopsites.com/bin/topsite.cgi?ford&cat=kewl&ID=152','_blank');" href="javascript:void(0);">Click Here to Vote for MEG!</a>";
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
thats all one line so make sure to put it on one line.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yeah, there's an extra
";
Several lines below - that shouldn't be there.
|
|
|
|
Joined: May 2003
Posts: 1,068
Junior Member
|
Junior Member
Joined: May 2003
Posts: 1,068 |
I also sent him a PM with the entire code that I used when I tested it in my palbox. Sorry, I should have posted that up right when I sent it.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
|
|
|
|
Joined: Jun 2002
Posts: 303
Enthusiast
|
Enthusiast
Joined: Jun 2002
Posts: 303 |
You can use html without any escaping! Just come out of php with ?> put your html in then go back to php with <? Simple. That's the beauty of php! 
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
true Fish  Thats probably the most unconfusing for newbies also.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
ahhh, i didnt realise i can come out of php, might play with that in the future. I've got phpadsnew running on my server, that could be handy actually!
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
You can also escape out of the php this way instead
echo <<<template
HTML HERE
template;
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|