Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Expandable Menu for Subcategories  (Read 5838 times)

DataVoyager

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Expandable Menu for Subcategories
« on: September 26, 2008, 03:06:42 AM »

I think the Expandable Menu for Subcategories is a fantastic addition. I've seen it working and I think it makes a big difference. I tried to get it to work with the Multi User Version but the categories just disappeared. Is this my ineptitude or has it not been implemented with the Multi User version yet?

Cheers

DV
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Expandable Menu for Subcategories
« Reply #1 on: September 26, 2008, 02:59:54 PM »

Yes it has. I'm not sure about anyone else but I have done it.
Just looking back at one of my applications... there aren't any specific MU-related strings in the functions - categories & subcategories. In fact, the function-set works the same way with both the single-user snews.php and the snewsMU.php... provided all of the related Subcategories mod bits are in place in both files.

In another application, I've added in check-strings to determine whether the viewer is logged in or not and screen out any data that is set to be viewed only by logged-in users... which then removes any category or subcategory titles and their content from public view... as well as individual articles if they are also tagged as user-only readable. In this case, I wrap the content-generating string(s) with:
Code: [Select]
<?php

if ($_SESSION[db('website').'Logged_In'] == token() || !$usersonly) {
// CONTENT GENERATING STRING HERE - Category title, Subcategory title or Article title links
}

?>


The "User Only View" option is a check-box string in the "Customize" Panel.
The state (Yes or No) is added to a new row in the articles table called useronly.
« Last Edit: September 26, 2008, 03:01:35 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

DataVoyager

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: Expandable Menu for Subcategories
« Reply #2 on: September 27, 2008, 03:44:33 AM »

Hi Folks,

Ok.... My Bad! School Boy Error! Have just had a proper look at the PHP and realised that I haven't actually made the original mod for sub categories  ??? How embarrassing!  I tried to obtain the zip file from the original thread (http://snewscms.com/forum/index.php?topic=6929.0) but both links are now inactive. Does anyone know where I might obtain it?

Cheers

DV
« Last Edit: September 27, 2008, 03:53:25 AM by DataVoyager »
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Expandable Menu for Subcategories
« Reply #3 on: September 27, 2008, 06:18:12 AM »

PM to the Author?
equilini
Logged
Yes! I have no siggy.

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Expandable Menu for Subcategories
« Reply #4 on: September 27, 2008, 06:44:34 PM »

@ Data... You can download this working, default (vanilla) sNews 1.6 Subcats DEV package. It uses an expandable vertical menuing system with basic styling using the jscript file included in the file-set. I've kept it in my Projects archive for some time.
Offline Installation (localhost): - just copy the complete file-set into your project folder, create the dbase, and use Import (in phpMyAdmin) to create the tables using the SQL file in the SQL-File folder.
Online Installation (host server): Same as above but do not load the SQL-File folder onto your server.

NOTE... This is a good working package as it was at the end of December.07. I refer to it as a DEV packages because the snews.php file contains comment notes to locate all of the mod locations file-wide... and it may not contain all of the minor Patches as listed in the 1.6 Patches forum board. It will serve well as a working example.

Hope you find it useful.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

DataVoyager

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: Expandable Menu for Subcategories
« Reply #5 on: September 28, 2008, 01:43:00 AM »

Wow! Now that's service! Thanks KeyRocks. Very much appreciated.
Logged

DataVoyager

  • Newbie
  • *
  • Karma: 0
  • Posts: 6
Re: Expandable Menu for Subcategories
« Reply #6 on: October 02, 2008, 02:23:10 PM »

Hi Folks,

I've managed to intrgrate the expanding subcategories into the MU version I'm hoping to use. I'm at the stage where I need to keep the subcategory menu open when the user clicks on a particular subcategory. Is there a "preferred way" to achieve this for sNews? E.g. Javscript, php etc? I'd like to keep to any predefined rules the sNews community has.

Cheers

DV
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Expandable Menu for Subcategories
« Reply #7 on: October 02, 2008, 05:41:48 PM »

Hi Folks,
I've managed to intrgrate the expanding subcategories into the MU version I'm hoping to use. I'm at the stage where I need to keep the subcategory menu open when the user clicks on a particular subcategory. Is there a "preferred way" to achieve this for sNews? E.g. Javscript, php etc? I'd like to keep to any predefined rules the sNews community has.
Cheers - DV

There is no "preferred way"... it's pretty much up to each individual developer. Those of us who have implemented these various Mods and packages have taken different routes to achieve what we need. Feel free to experiment with whatever you desire.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU