Welcome, Guest. Please Login or Register.
November 28, 2024, 09:47:00 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.x] News Archive « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: [Done 1.5.x] News Archive  (Read 7729 times)
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

[Done 1.5.x] News Archive
« on: July 18, 2003, 06:55:39 PM »
Reply with quote

ID: News Archive

Version: 1.0

Mod Info:
This mod lists all the topic titles in a board, sorted by posted time (descending) and grouped by month and year.
To include it, basically you need to do the same thing as including news, just change the action with action=newsarchive:
http://www.site.com/forum/index.php?action=newsarchive;board=x
You can also use template= like in News.php to use a different template file. The only thing that's not available is limit=
The look is customizeable through the template file.

Since all of you that uses this mod uses News.php, I included my version of News.php that's more optimzed than 1.5.4 News.php. I removed some db connection and types to register crap, also changed the db queries. To use this version, just overwrite your current News.php with the one in the zip.
1.6.0 should have a more optimzed News.php though.

Demo:
template 1 (simple view)
template 2 (using tables)

Download:
BoardMod file

Instructions:
1.) Apply this .mod file in BoardMod, or apply the change manually
2.) Upload index.php and the template file into forum directory, and NewsArchive.php into Sources directory

Changelogs:
-
« Last Edit: January 31, 2004, 09:54:20 PM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Valconeye
Full Member
***
Posts: 190


Re:[Done 1.5.x] News Archive
« Reply #1 on: July 18, 2003, 08:26:53 PM »
Reply with quote

wonderful, installing it now  ;D
i have it working here http://www.warcraftwars.com/?link=archives
« Last Edit: July 22, 2003, 04:16:31 PM by Valconeye » Logged
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done 1.5.x] News Archive
« Reply #2 on: July 19, 2003, 06:41:44 PM »
Reply with quote

I am going to install him and make a dutch lang. file

« Last Edit: July 19, 2003, 07:07:10 PM by BiErLeEuW » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Done 1.5.x] News Archive
« Reply #3 on: July 19, 2003, 07:07:25 PM »
Reply with quote

there's no language file changes here ;)
there are some new words, but i wrote them in the template file
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done 1.5.x] News Archive
« Reply #4 on: July 19, 2003, 07:26:23 PM »
Reply with quote

i would like a Day in dutch before the date ;) like

July

Saturday 5
Logged
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done 1.5.x] News Archive
« Reply #5 on: July 20, 2003, 09:19:14 AM »
Reply with quote

Your mod is not working  :'( , he is going to include whole board 3.

<? include("http://www.onsforum.nl/yabbse/index.php?action=newsarchive;board=3") ?>

result:

http://www.onsforum.nl/main2.php
« Last Edit: July 20, 2003, 07:14:38 PM by BiErLeEuW » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Done 1.5.x] News Archive
« Reply #6 on: July 20, 2003, 07:04:39 PM »
Reply with quote

Quote from: BiErLeEuW on July 19, 2003, 07:26:23 PM
i would like a Day in dutch before the date ;) like

July

Saturday 5
open the template, and change:function PrintArchive()
{
   global $news_icon, $news_date, $news_title, $news_poster, $news_comments, $txt;
   echo '
   ' . $news_date . ': ' . $news_icon . ' ' . $news_title . ' ' . $txt[525] . ' ' . $news_poster . ' (' . $news_comments . ')<br />';
}

into:
function PrintArchive()
{
   global $news_icon, $news_date, $news_title, $news_poster, $news_comments, $txt, $news_day;
   echo '
   ' . $news_day . ' ' . $news_date . ': ' . $news_icon . ' ' . $news_title . ' ' . $txt[525] . ' ' . $news_poster . ' (' . $news_comments . ')<br />';
}

I added $news_day there
if you want the longer version for news_day, not the abbreviated day name, change in NewsArchive.php
$news_day = strftime("%a", $row['posterTime']);
into:
$news_day = strftime("%A", $row['posterTime']);
or take a look here: http://www.php.net/strftime
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done 1.5.x] News Archive
« Reply #7 on: July 22, 2003, 11:31:20 AM »
Reply with quote

very nice mod of you spaceman-spiff:

working here:
http://www.onsforum.nl/index.php?page=newsarchive

So if you wanna see a demo?
Logged
Thomas
Full Member
***
Posts: 203


WWW
Re:[Done 1.5.x] News Archive
« Reply #8 on: July 22, 2003, 12:36:02 PM »
Reply with quote

Thanks again for a very Nice mod Spaceman-Spiff.

I have it now up and working here.

/Thomas
Logged
Valconeye
Full Member
***
Posts: 190


Re:[Done 1.5.x] News Archive
« Reply #9 on: September 03, 2003, 01:42:15 AM »
Reply with quote

hmm any luck with a limit feature? cause my archive is getting a little big  ;D
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.x] News Archive
« Reply #10 on: September 03, 2003, 03:54:28 AM »
Reply with quote

Cool..

-[Unknown]
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Done 1.5.x] News Archive
« Reply #11 on: September 05, 2003, 05:17:58 PM »
Reply with quote

i guess i can paginate it...
but im afraid i have no time to code it right now...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Valconeye
Full Member
***
Posts: 190


Re:[Done 1.5.x] News Archive
« Reply #12 on: November 01, 2003, 12:26:26 AM »
Reply with quote

any luck with a limit? it would be really nice to limit by month, like just show 2 months, or 3 or 4 etc...
Logged
crash5456
Guest
Re:[Done 1.5.x] News Archive
« Reply #13 on: November 06, 2003, 05:07:15 AM »
Reply with quote

I applied this mod yesterday and my news fader disappeared on me.

Can anyone tell me what might have happened and how to fix it.

Thx in Advance
Logged
crash5456
Guest
Re:[Done 1.5.x] News Archive
« Reply #14 on: November 06, 2003, 09:54:46 PM »
Reply with quote

I need some help here, I applied this mod, and read these instructions:

This mod lists all the topic titles in a board, sorted by posted time
(descending) and grouped by month and year.

To include it, basically you need to do the same thing as
including news, just change the action with action=newsarchive:

http://www.site.com/forum/index.php?action=newsarchive;board=x

You can also use template= like in News.php to use a different
template file. The only thing that's not available is limit

I do not understand how or where I'm to make those changes I am definately new at this, applying with Board Mod I can do but when it comes to actual code changes I'm trying to understand
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.x] News Archive « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.056 seconds with 20 queries.