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: Placeholders {CAT_TITLE)  (Read 3872 times)

0 Members and 1 Guest are viewing this topic.

tonycraft

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Placeholders {CAT_TITLE)
« on: December 07, 2004, 12:41:07 am »

How do i define my own placedholders {placeholder} in theme.php.
I would like to define my own placeholder to display index.php?cat=ID instead of the {CAT_TITLE} which displays <a href=index.php?cat=1(ID)>.

Ex :
{CAT_TITLE} = <a href=index.php?cat=(ID)>
{NEW Placeholder}  = index.php?cat=(ID)

Im not the good with PHP yet .. so if anybody could give me a few hints i woud apreciate it.

Thanks :
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Placeholders {CAT_TITLE)
« Reply #1 on: December 07, 2004, 03:03:14 am »

Why would you do this?

You can edit the area around the CAT_TITLE by editing your theme.php.

Look for the <!-- BEGIN catrow_noalb --> and   <!-- BEGIN catrow --> sections in your theme.php.

Perhaps if you explain your entire intention I could give you a bit more accurate suggestion.
Logged

tonycraft

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Placeholders {CAT_TITLE)
« Reply #2 on: December 07, 2004, 10:26:52 am »

onclick="window.location.href=' {CAT_TITLE}'" --->
displays onclick="window.location.href='<a href=index.php?cat=1(ID)>.'"

and i would like it to be displayed like :

onclick="window.location.href=' {CUSTOM MADE PLACEHOLDER}'" --->
displays onclick="window.location.href='index.php?cat=1(ID).'"

I dont wanne mess with {CAT_TITLE} because it works perfect..
I would rather make a new palceholder.

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Placeholders {CAT_TITLE)
« Reply #3 on: December 07, 2004, 01:06:04 pm »

OK, but what is the {CUSTOM MADE PLACEHOLDER} suppossed to contain? In the end, you only need the category ID, right - there's no need to have a custom placeholder then. Just post where the link to the category should appear, e.g. what exactly should have a link to the category in question. Preferably, post a deep link to  a page on your site that is suppossed to contain a custom link, and describe where exactly the link should be (e.g. "when a user clicks "foo" on the page "bar", he's suppossed to be sent to the category index").

Joachim
Logged

tonycraft

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Placeholders {CAT_TITLE)
« Reply #4 on: December 07, 2004, 01:42:36 pm »

Thanks u for the answer !

Ill try it out !
Logged

tonycraft

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Placeholders {CAT_TITLE)
« Reply #5 on: December 08, 2004, 02:19:15 pm »

HI again

I would really like to have a placeholder called {CAT_NAME}, that only show the category name and dosent turn it into a link like {CAT_TITLE} does.

is it possible to create one ...and how ?

Tony Craft
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Placeholders {CAT_TITLE)
« Reply #6 on: December 08, 2004, 07:57:00 pm »

Then do as I told you >:( :
Just post where the link to the category should appear, e.g. what exactly should have a link to the category in question. Preferably, post a deep link to  a page on your site that is suppossed to contain a custom link, and describe where exactly the link should be (e.g. "when a user clicks "foo" on the page "bar", he's suppossed to be sent to the category index").

Joachim
Logged

tonycraft

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Placeholders {CAT_TITLE)
« Reply #7 on: December 08, 2004, 11:42:20 pm »

What u are writing makes no sense to me ....all i want is :
onclick="window.location.href='index.php?cat={$subcat['cid']}> to work
it only show index.php?cat=


<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="tableb" colspan="3" onmouseover="this.style.backgroundColor='#FFFFFF';this.style.cursor='hand';" onMouseOut=this.style.backgroundColor="" onclick="window.location.href='index.php?cat={$subcat['cid']}'">

<table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span><span class="cat_desc">{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->


Tony Craft
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.