[MOD] Categories in header like Digg (useful if you have subcategories)

Register an Account
Reply
 
Thread Tools Display Modes
  #41 (permalink)  
Old 08-07-2007, 12:46 AM
grimusm's Avatar
Casual Pligger
Pligg Version: 9.7
Pligg Template: custom
 
Join Date: Aug 2007
Posts: 51
Can any confirm that this is working in 9.7 version of pligg.

I click on my categories under the header but no subcategories appear. Looking at the code where the subcategory bar should appear i only have empty <span></span>

This has been tried with both codes in this thread on a new installation of pligg.

If it makes any difference i am using Simplifed Chinese lang on the script. But as this is just he lang file it should not affect anything else right?

Thanks for any help, i would love to get this going. And have wasted a lot of time in futile trying to get it working..
Reply With Quote
  #42 (permalink)  
Old 08-07-2007, 01:12 AM
Casual Pligger
 
Join Date: Jul 2007
Posts: 38
Yes, it works well with version 9.7.
Please create the categorie and sub categories first through the admin panel.
Reply With Quote
  #43 (permalink)  
Old 08-12-2007, 01:16 AM
grimusm's Avatar
Casual Pligger
Pligg Version: 9.7
Pligg Template: custom
 
Join Date: Aug 2007
Posts: 51
Yes i have categories and sub categories, but it doesn't work. After clicking on category the category contents load, but the sub category bar is not shown (on screen or in the code)

Does this mods rely on any other setting in admin.

My 9.7 installation is basically out-the-box.
Reply With Quote
  #44 (permalink)  
Old 08-13-2007, 01:02 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,960
Are you sure you have sub-categories - created - if they are present - it will get displayed.
Reply With Quote
  #45 (permalink)  
Old 08-14-2007, 05:07 AM
New Pligger
 
Join Date: Jul 2007
Posts: 4
Dollars5,

The sub-categories don't get displayed on my install of Pligg9.7 as well. The env: IIS6+PHP5.2.3+Mysql5.0.27... It can only display the main cat... can you shed some light on it again?

Thanks!
Reply With Quote
  #46 (permalink)  
Old 08-14-2007, 10:39 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,960
I have no idea on how the IIS will behave - and only tested on apache+php

How it works is that it reads the request_category, tried to find the parent category of the sub-cat or if it is the parent category itself. then it goes on to display the main and sub categories (in the code you will find two section loops)

Also in story pages - there is no possibility of reading the story category - so the sub-cat will get ignored.
Reply With Quote
  #47 (permalink)  
Old 08-15-2007, 02:44 AM
New Pligger
 
Join Date: Jul 2007
Posts: 4
Dollars5,

Do I find a right fix?
The cause:
Yes. the code is working fine with categories all in English, however NOT in a double-byte language like Chinese. {$cat_array[thecat].safename eq $requested_cat} can never be equal since safename is url_encoded, however $requested_cat not.
My workaround:
in libs/smartyvariables line around:18, change:sanitize($_REQUEST['category'], to
urlencode(sanitize($_REQUEST['category']). Then the header category code is working cool for both Chinese and English. However, I'm not sure if this change would bring trouble in for the rest of Pligg. Could you advice on it?

Thanks again!
Reply With Quote
  #48 (permalink)  
Old 08-15-2007, 04:39 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,960
Never tried on other languages either, will try on it when free to see if I can get any solution.
Reply With Quote
  #49 (permalink)  
Old 08-15-2007, 11:48 AM
New Pligger
 
Join Date: Aug 2007
Posts: 2
Hi! Great mod!

Is there a way to change link of the thumbnail to point to the URL of story or the URL of the website that contains the story?

Thanks!!
Reply With Quote
  #50 (permalink)  
Old 08-15-2007, 12:59 PM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,960
? I did not get what you meant - probably if you can elaborate, we can help.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[MOD] Submit-step2 Digg like categories selection with radio button dollars5 Questions and Comments 73 04-02-2011 09:29 PM
Shredit - Categories on header? b4ifuru18 Questions and Comments 2 07-22-2009 10:13 PM
In 1.0RC5 - Digg like categories in Submit-step2 selection with radio button arif1999 Questions and Comments 1 07-02-2009 11:46 AM
HELP: Drop Down Categories in Header Tutorial for ver 9.9.5 arkasun Questions and Comments 3 10-19-2008 10:39 PM
Categories like in Digg rhythm Questions and Comments 7 05-26-2007 03:14 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development