coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: tonycraft on December 07, 2004, 12:41:07 AM

Title: Placeholders {CAT_TITLE)
Post by: tonycraft 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 :
Title: Re: Placeholders {CAT_TITLE)
Post by: donnoman 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.
Title: Re: Placeholders {CAT_TITLE)
Post by: tonycraft 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
Title: Re: Placeholders {CAT_TITLE)
Post by: Joachim Müller 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
Title: Re: Placeholders {CAT_TITLE)
Post by: tonycraft on December 07, 2004, 01:42:36 PM
Thanks u for the answer !

Ill try it out !
Title: Re: Placeholders {CAT_TITLE)
Post by: tonycraft 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
Title: Re: Placeholders {CAT_TITLE)
Post by: Joachim Müller on December 08, 2004, 07:57:00 PM
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
Title: Re: Placeholders {CAT_TITLE)
Post by: tonycraft 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