javascript inside php variable for coppermine default theme
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine
Author Message
dusman
Dragonfly addicted


Joined: Mar 17, 2006
Posts: 303
Location: Maryland

PostPost subject: javascript inside php variable for coppermine default theme
Posted: Sat Jan 19, 2008 3:42 am
Reply with quote

Hello all, I am trying to put some java script in the default theme.inc file for coppermine. I am looking a the very last function all the way at the bottom. Line 555 of theme.inc. I am trying to add a new <tr> for a bookmark link, however either you can't put javascript code into a php variable or I just have the syntax wrong. Can anyone point me in the right direction? Thanks, code attached

Default code:
Code:
function theme_html_picinfo(&$info)
{
       $html = '<tr><td colspan="2" class="tableh2_compact"><b>'.PIC_INF_TITLE.'</b></td></tr>';
        $template ="        <tr><td class=\"tableb_compact\" valign=\"top\" nowrap=\"nowrap\">%s:</td><td class=\"tableb_compact\">%s</td></tr>\n";
        foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);
        return $html;
}

What I am trying to add:

[code]$html = '<tr><td colspan="2" class="tableh2_compact"><b>'.PIC_INF_TITLE.'</b></td></tr><tr><td>
<!-- AddThis Bookmark Button BEGIN -->
<script type="text/javascript">
addthis_url = location.href;
addthis_title = document.title;
addthis_pub = 'dusman';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
<!-- AddThis Bookmark Button END -->
</tr></td>';[/
code]

_________________
-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
Back to top
View user's profile Visit poster's website
dusman
Dragonfly addicted


Joined: Mar 17, 2006
Posts: 303
Location: Maryland

PostPost subject: Re: javascript inside php variable for coppermine default theme
Posted: Sat Jan 19, 2008 3:46 am
Reply with quote

fyi, I don't get an error or anything, it just displays a blank page
_________________
-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
Back to top
View user's profile Visit poster's website
greenday2k
Forum Admin


Joined: Aug 11, 2005
Posts: 484
Location: CO

PostPost subject: Re: javascript inside php variable for coppermine default theme
Posted: Sat Jan 19, 2008 5:41 pm
Reply with quote

change:

addthis_pub = 'dusman';

to

addthis_pub = "dusman";

maybe it helps

_________________
www.greenday2k.net



greenday2k's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website MSN Messenger Yahoo Messenger
dusman
Dragonfly addicted


Joined: Mar 17, 2006
Posts: 303
Location: Maryland

PostPost subject: Re: javascript inside php variable for coppermine default theme
Posted: Sat Jan 19, 2008 6:48 pm
Reply with quote

hahaha, thanks, thats exactly what it was, sometimes it just takes another set of eyes on it! much appreciated!
_________________
-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexCoppermine All times are GMT
Page 1 of 1


Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.8558 seconds with 19 DB Queries in 0.2541 seconds
Memory Usage: 2.88 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy