Placeholders {CAT_TITLE) Placeholders {CAT_TITLE)
 

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]

Main Menu

Placeholders {CAT_TITLE)

Started by tonycraft, December 07, 2004, 12:41:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tonycraft

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 :

donnoman

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.

tonycraft

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

Joachim Müller

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

tonycraft

Thanks u for the answer !

Ill try it out !

tonycraft

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

Joachim Müller

Then do as I told you >:( :
Quote from: GauGau on December 07, 2004, 01:06:04 PM
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

tonycraft

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