• [Mod] Different cat templates / Verschiedene Kategorie Templates 4 0 5 1
Currently:  

Author Topic: [Mod] Different cat templates / Verschiedene Kategorie Templates  (Read 124274 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
[Mod] Different cat templates / Verschiedene Kategorie Templ
« Reply #30 on: January 25, 2003, 11:36:37 AM »
Der Code für ein Zufallsbild neben dem Kategorienamen steht auskommentiert im Template category_bit.html.

Für ein festes Bild kann man z.B.
Code: [Select]
<img src="/images/{cat_id}.gif" border="1">
einfügen und dann im Ordner "images" für jede Kategorie ein Bild <cat_id>.gif hinterlegen.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Gabi

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.gabis-traum.de
[Mod] Different cat templates / Verschiedene Kategorie Templ
« Reply #31 on: January 25, 2003, 12:44:43 PM »
Hallo Jan,

danke für deine schnelle Antwort. Wie müßte der Cod

Code:
<img src="/images/{cat_id}.gif" border="1">

denn aussehen wenn ich 20 verschieden Kategorien habe und wie sieht die genaue Benennung der "images" denn aus ???? Sorry falls dir diese Frage dumm erscheint, aber ich bin in Sachen php noch Anfänger. Deshalb frage ich manchmal lieber etwas genauer bevor ich etwas kaputt mache :oops:

lg
Gabi

Offline Gabi

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.gabis-traum.de
[Mod] Different cat templates / Verschiedene Kategorie Templ
« Reply #32 on: January 25, 2003, 02:51:39 PM »
Hallo Jan,

habe den Cod der category_bit.html wie folgt verändert :

<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
     <img src="/images/Cat-Images/{cat_id}.gif" border="1">
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="/images/Cat-Images/{cat_id}.gif" border="1">-->
    </td>
    <td>
     <a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})
      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
   </td>
  </tr>
</table>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}

aber die bilder werden nicht angezeigt. Die Bilder habe ich unter /images/Cat-Images abgespeichert und wie folgt benannt hier 2 Beispiele :

32.gif und 19.gif    wird nicht angezeigt
<32>.gif und <19.>gif  wird auch nicht angezeigt
<cat_id32>.gif und <cat_id19>.gif wird auch nicht angezeigt

Kannst du mir vieleicht sagen wo ich einen Fehler mache???? Platzhalter erscheinen nämlich an den Stellen wo die Bilder sein sollten...

Wäre echt toll wenn du eine Lösung hättest.

M.f.G.

Gabi

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
How can user to chose diferent templates
« Reply #33 on: May 13, 2003, 07:41:48 AM »
How can user to chose diferent templates on the same site.??

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #34 on: May 05, 2005, 05:06:29 PM »
categories works well - however, the Details pages don't "take" -

Quote
If you want to use a different template for the details page , do step 2 for "details.php". Then create a new template for the details page (you may duplicate "details.html" and modify it) an save it under this name:

Code:
details_<cat_id>.html
Replace <cat_id> with id of the category.
This category and all subcategories will now use this template for the details page.

basically, I want to hide the "uploaded by" lines in certain categories in the Details pages. When I  make the change mentioned above, create my new template and upload, *all* details pages are using the new template...

Anything I missed  :?:?:idea:  :?:

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #35 on: May 06, 2005, 10:56:19 AM »
Can you show an example?
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #36 on: May 06, 2005, 01:56:53 PM »
sure - click my sig.

I basically want to hide everyone's name who uploads something to the "Challenge" category (which is category #52), and everything underneath it -
  • The category template ("Categories_52.html") works well - everywhere in the challenge cat & all sub & sub-sub categories hide the user name on the thumbnail. It also has a red bar across the top with a menu in it.
  • Clicking a thumbnail from any of the challenge categories opens the Details_52.html template, which ALSO has a red bar across the top and "[*User Name Hidden*]" in the "uploaded by: " section - but this template is used throughout the whole site on every details page, not just the ones beneath the challenge cat.
  • Try this category to see what I mean - it reverts back to the "standard" categories template (no red bar & uploader name is shown), but clicking an image opens the "Red Bar" details template.


For some reason, it's not reverting to the standard details template for non-challenge images...?

thanks for any help - -

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #37 on: May 06, 2005, 05:27:57 PM »
If i click on this image for example, there is no "red bar". Seems to work perfect  :roll:
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #38 on: May 06, 2005, 05:43:30 PM »
Ack!

I changed it back this morning when some users emailed me about a "bug".... - sorry!

Let me change the template again (& irritate visitors!) so you can see what I mean - - - it's changed...  try this image again - - you'll see a red bar now...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #39 on: May 06, 2005, 06:15:06 PM »
I think its because of your "recent comments" feature, which probably changes value of $cat_id variable.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #40 on: May 06, 2005, 06:26:04 PM »
hmm.... thx - -

time to actually think now, instead of waiting for someone else to do it for me   8)   (I hate when that happens....)

[thinking out loud..]   so I have to somehow readjust the $cat_id to look at templates....... 

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #41 on: May 06, 2005, 06:48:58 PM »
if anything in details.php is altering $cat_id variable, just replace it with another variable ($catid)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #42 on: May 07, 2005, 01:21:38 AM »
how/where?  I've replaced (in the three files used in this MOD - details.php, categories.php, functions.php) the seven instances of $cat_id with $catid

No luck.  Works great still with the category pages, but details pages are still not responding.... :cry:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #43 on: May 07, 2005, 01:26:19 AM »
I was only refering to the code for your "recent comments" (unless ofcourse it's in page_header.php)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Different cat templates / Verschiedene Kategorie Templates
« Reply #44 on: May 07, 2005, 03:34:48 AM »
AArrggghhh!   still can't figure out what's not working or what's interfering.

Simple thing - all I want is users to not see who uploaded images in one category, plus its sub-categories!

"recent comments" code is in Details.php - but shouldn't "unset($cat_id);" work to turn it off, if I place this snippet before it arrives at the category selection piece of code?  (tried - didn't work, either... but maybe I'm not placing it in the right place. I placed it just above "// Print Out"  section....)

 8O

Any & all help is much appreciated
- my php is still not too good (but I'm learning!)  :oops:

 :arrow:should I post my details.php here?