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: Special tags and how to add your own?  (Read 8059 times)

0 Members and 1 Guest are viewing this topic.

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Special tags and how to add your own?
« on: August 15, 2008, 07:24:27 pm »

You see themes have special tags like:
{GAL_NAME}
{LANGUAGE_SELECT_FLAGS}
{GALLERY}
etc.
So, how do I make my own tag like {banners} and it will show content from php,html page?
Logged

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Special tags and how to add your own?
« Reply #1 on: August 17, 2008, 03:02:05 pm »

Anyone?
Logged

Nibbler

  • Guest
Re: Special tags and how to add your own?
« Reply #2 on: August 17, 2008, 03:11:57 pm »

They are in the pageheader/pagefooter functions.
Logged

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Special tags and how to add your own?
« Reply #3 on: August 17, 2008, 07:31:48 pm »

Can you explain if it is possible to add your own to a theme ?
Logged

Nibbler

  • Guest
Re: Special tags and how to add your own?
« Reply #4 on: August 18, 2008, 10:05:57 am »

Yeah. You copy the pageheader or pagefooter functions from the sample theme into your theme.php and modify that.
Logged

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Special tags and how to add your own?
« Reply #5 on: August 18, 2008, 11:34:45 am »

Okay,I found how to do that and now I need little help for stupid me.
I added {BANNERS} tag and made it to be $bannerpage
Now I need this $bannerpage to be include('banners.php')
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Special tags and how to add your own?
« Reply #6 on: August 18, 2008, 11:51:09 am »

If 'banners.php' outputs the banners, try
Code: [Select]
'{BANNERS}' => include('banners.php')
Logged

Nibbler

  • Guest
Re: Special tags and how to add your own?
« Reply #7 on: August 18, 2008, 12:11:29 pm »

Code: [Select]
'{BANNERS}' => cpg_get_custom_include('banners.php'),
Logged

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Special tags and how to add your own?
« Reply #8 on: August 18, 2008, 03:08:46 pm »

Strange I added '{BANNERS}' => cpg_get_custom_include('banners.php'), to my pagefooter at the end, but in theme {BANNERS} remains the same. I dont get errors or anything
Logged

Nibbler

  • Guest
Re: Special tags and how to add your own?
« Reply #9 on: August 18, 2008, 03:10:45 pm »

If {BANNERS} is before {GALLERY} it belongs in pageheader. If it's after {GALLERY} then it goes in pagefooter.
Logged

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Special tags and how to add your own?
« Reply #10 on: August 18, 2008, 03:14:03 pm »

Aww, I am dumb :(
Where and what do I need to put to banners.php so it shows html  ::)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Special tags and how to add your own?
« Reply #11 on: August 18, 2008, 03:21:10 pm »

Aww, I am dumb :(
Where and what do I need to put to banners.php so it shows html  ::)

Some code, that returns something like
Code: [Select]
<a href="http://www.google.com"><img src="banner.png" /></a> ??? ??? ???
Logged

johanz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Special tags and how to add your own?
« Reply #12 on: August 18, 2008, 03:26:02 pm »

Okay everything works now,thanks. You can lock if needed
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Special tags and how to add your own?
« Reply #13 on: August 18, 2008, 03:35:06 pm »

Mark the thread yourself as solved by clicking on the hook in your first post.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.