Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Use javascript inside coppermine  (Read 2537 times)

0 Members and 1 Guest are viewing this topic.

chzuqi

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Puzzz Jigsaw World
Use javascript inside coppermine
« on: March 10, 2009, 08:23:59 am »

I use it when i want to add some jquery effect,without any hack,it green and safe,
Just Edit the theme.php file's pageheader function
Code: [Select]
function pageheader($section, $meta = '',$script='')and put this       
Code: [Select]
       '{SCRIPTS}'    => $script,before  of after   
Code: [Select]
       '{CUSTOM_HEADER}' => $custom_header, and Edit the template.html put the Tag   {SCRIPTS}
After
Code: [Select]
<script type="text/javascript" src="scripts.js"></script>now you can use the function like that
Code: [Select]
$script=<<<EOT
<script type="text/javascript">
             //your code here
</script>
EOT;
pageheader($title,'',$scripts);
i wish somebody know what i mean....
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.