Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Toggeling archive and sitemap  (Read 1458 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Toggeling archive and sitemap
« on: October 03, 2007, 12:16:59 pm »

OK, this has been discussed before, and if there is a solution to it, i just have missed it, and therefor brings it up again. Correct me in such case... I know of the 1.5 version, but that is not working with 1.6, as far as I can tell, so here goes...

I want to be able to toggle archive and sitemap... Starting with archive, now I've read this: http://snewscms.com/forum/index.php?topic=2558.0 and nearly every thread related to it, and I just can't get it to work... I've seen Bob's expandable archive and sitemap (1.5) but alas...

Now, in my non-coder head it should be possible to use this: http://snewscms.com/forum/index.php?topic=5896.0 to get the month's in sitemap hide/show the content therein, or... ?

In such case it would be this inside function archive() that would need changing:
Quote
echo l('divider').' <a href="'.db('website').$categorySEF.'/'.$articleSEF.'/" title="'.$title.'">'.$title.'</a> ('.$cat_name.')<br />';

No ?

Ok, I need to get me some coffee and go think, if I can ;)
« Last Edit: October 03, 2007, 12:36:29 pm by Patric Ahlqvist »
Logged
"It's only dead fish that goes with the flow... "
Updated

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: Toggeling archive and sitemap
« Reply #1 on: October 03, 2007, 12:46:10 pm »

Nah.... that's the actual links to the articles, it would be nessecary to alter, the above, somehow...

Quote
if ($last <> $year.$month) {echo '<br /><strong>'.$month_name.', '.$year.'</strong><br /> ';}

Just to show how dumb I am, I'm gonna post what I tried, hehe... Brace yourselfs now ;)

I changed everything from the above to this:

Quote
if ($last <> $year.$month) {echo '<a title="Links" class="toggle" onclick="toggle('content_archive')" style="cursor:pointer;"><strong>'.$month_name.', '.$year.'</strong></a> <br /> ';}
echo '<div id="content_content_archive" style="display:none;">';
         echo l('divider').' <a href="'.db('website').$categorySEF.'/'.$articleSEF.'/" title="'.$title.'">'.$title.'</a> ('.$cat_name.')<br />';
         $last = $year.$month;
echo '</div>';

(Changes in red) And of course it didn't work at all, hehe... None' the less, it's one thing eliminated from the not so possible ways of making this work, ;)

And just to make it more irriable, I would like for this thingy to remember how I had it last time I was on the site... Much like the forums expandable boards...
« Last Edit: October 03, 2007, 01:03:16 pm by Patric Ahlqvist »
Logged
"It's only dead fish that goes with the flow... "
Updated