Author Topic: Cat Parent Name  (Read 10741 times)

0 Members and 1 Guest are viewing this topic.

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Cat Parent Name
« on: January 26, 2009, 05:13:37 PM »
Hi guys,

I've added some code to my 4images to make the Cat Parent name show where I want it to but it doesn't show the corrent Cat Parent name in certain places. I don't place any images in the Main Catagories just in Sub Categories.

If you go here you will see the Cat Parent does display correctly >> http://cdcoverhideout.com/categories.php?cat_id=42

If you go here you will see the Cat Parent name doesn't display correctly >> http://cdcoverhideout.com/categories.php?cat_id=55

Now I've noticed that if a Sub Cat doesn't have any images uploaded into it, it doesn't show the correct Cat Parent name and it does when there are images uploaded into it.

Is there a way of making this show if there are no images in that Sub Cat :D

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Cat Parent Name
« Reply #1 on: January 27, 2009, 02:24:11 AM »
hmmm...

i'm not sure about which place you talking about.
dropdown?
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

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: Cat Parent Name
« Reply #2 on: January 27, 2009, 02:24:20 AM »
I went to both links and I have no idea what I was supposed to look at...but any ways, you are asking to help you with the code that you made yourself without showing us the code itself...I don't know any psychic on this forum who could possible help. ;)
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 cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #3 on: January 27, 2009, 08:09:34 AM »
On the 1st link you will see on the same line as the Multi Upload and normal upload button this title "Blu-Ray Covers, Letter 0-9". This sub cat has images in it.

Sorry one of the links I gave was a bad example, this link http://cdcoverhideout.com/categories.php?cat_id=56 to a sub cat that has no images in it should have this title "Blu-Ray Covers, Letter N" but has this title instead "Audio Covers, Letter N" now if I upload 1 image to this sub cat it will display the correct title.

Hope this is clear, if you go here http://cdcoverhideout.com/categories.php?cat_id=31 and look at a sub cat that has images in it and look for the sub cat title and then look a sut cat without images and again look at the sub cat title and you will see what I mean :)

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: Cat Parent Name
« Reply #4 on: January 27, 2009, 08:45:23 AM »
As I said, you don't give us any information about the changes you've made. What could be wrong? - there are unlimited variations of what could be wrong, I'm not even going to start guessing.
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 cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #5 on: January 27, 2009, 10:59:43 AM »
Sorry V@no it's been a while since I implemented the code, I didn't code it myself, I used this code from Jan's post here http://www.4homepages.de/forum/index.php?topic=3176.0 :D

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #6 on: January 28, 2009, 11:54:09 AM »
Any luck V@no :)

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #7 on: February 03, 2009, 01:34:49 PM »
Anybody :?

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: Cat Parent Name
« Reply #8 on: February 03, 2009, 03:41:31 PM »
The code Jan provided works fine. It must be something else you've changed.
As I said two times already, without knowing exactly what changes you made, it's impossible to help.
For starters you can try create copies of functions.php, page_header.php and categories.php and rename these copies to functions.phps , page_header.phps and categories.phps, then provide the link to these files
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 cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #9 on: February 07, 2009, 06:28:36 PM »
It's been a while since I added the code so can't fully remember, I've attached the files :)

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: Cat Parent Name
« Reply #10 on: February 07, 2009, 09:09:32 PM »
In categories.php find:
Code: [Select]
  "msg" => $msg,

Insert below:
Code: [Select]
  "cat_parent_name" => ($cat_cache[$cat_id]['cat_parent_id'] != 0) ? $cat_cache[$cat_cache[$cat_id]['cat_parent_id']]['cat_name'] : "",
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 cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #11 on: February 08, 2009, 01:46:59 PM »
Thanks v@no man, works wonders :lol:

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #12 on: February 08, 2009, 10:48:47 PM »
Hi V@no

Another slight glitch, on the member_uploadform.html I have changed this

Code: [Select]
<td class="row1">{cat_name}</td>
To this

Code: [Select]
<td class="row1">{cat_parent_name} > {cat_name}</td>
It should display for example "Playstation 3 > T" but it displays "Audio > T" when you goto upload on the Playstation 3 Sub Cat "T".

Hope this is clear :D

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: Cat Parent Name
« Reply #13 on: February 08, 2009, 11:30:29 PM »
In member.php below
Code: [Select]
    "cat_id" => $cat_id,
insert the same line as in categories.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 cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Cat Parent Name
« Reply #14 on: February 10, 2009, 11:43:12 AM »
Hi V@no

That worked in my Multiupload.php file too, thanks man your a legend :)