Page 1 of 1

{SHOW_ARTICLE_CALENDAR}{SHOW_ARTICLES} combo

Posted: Mon 31. Jul 2006, 05:21
by jsw_nz
Hi All,

Been working on a personal project (kind of a psuedo blog) on my localhost - which I plan to port to the web. As part of this project, I have developed a 'article calendar' that can be queried by day and/or month. Helpful for my own requirements - just to keep track of work and files. I am releasing it to the community - with the hope the a few others might find it useful. It is a beta and will require testing.

Looks like this
(It is CSS Driven - not tested in tables setting)

****************************************
Image
****************************************

The {SHOW_ARTICLES} code was drawn in large part from Erich's Great {TEASER_EX} -- so big thanks to Erich is mentioned here --
Here are comments that are included in zip (bottom of post)

Code: Select all

{SHOW_ARTICLE_CALENDAR}  replacement tag
* developed by jsw_nz (john) for phpWcms
* released as beta - 
please report bugs and suggestions to:
jswnz@xtra.co.nz

*July 30, 2006 (beta 0.5)
 // requirements: mysql >= 4.x, phpwcms ver >= 1.2.x 
--------------------------------------------------------------------------------------------
copy this file to phpwcms_template\inc_script\frontend_render
--------------------------------------------------------------------------------------------
FUNCTION:
Provides a calendar display of articles postings sorted by month using creation_date parameter 
Can return articles from all categories OR return articles based on supplied category ID 
(1) In cases where only one article is found - creates hyperlink to that article   
>>>  _.index.php?id=XX,YY,0,0,1,0     or    _. XX.YY.0.0.1.0.phtml  if $phpwcms["rewrite_url"] = 1;
(2) In cases where more than one article is found, creates hyperlink to redirect page. 
Redirect page parses the GET parameter 
>>> _.index.php?show_articles&d=20060729  or  _.show-articles&d=20060729.phtml
--------------------------------------------------------------------------------------------
Redirect Page Instructions see {SHOW_ARTICLES} instructions - below
(1) Requires the creation of a separate category in backend that matches $redirectLink string IE alias: show_articles
(2) an article for that category with the replacement tag {SHOW_ARTICLES} found within it.
--------------------------------------------------------------------------------------------
Calendar is driven by CSS - see calendar.css provided in zip - modify to suit
Impementation in ""tables based setting may require additional editing"" of css
USAGE:
--------------------------------------------------------------------------------------------
{SHOW_ARTICLE_CALENDAR:0} - returns all articles regardless of category
{SHOW_ARTICLE_CALENDAR:2} - returns all articles of category ID (2) - good for simple news section 
--------------------------------------------------------------------------------------------
*/

/* ----------------------------------------------------------------------------------------
{SHOW_ARTICLES}  replacement tag
* developed by jsw_nz (john) for phpWcms 
* released as beta - please report bugs and suggestions to:
jswnz@xtra.co.nz
*July 30, 2006 (beta 0.5)
A large section of this code draws from TEASER_EX replacementtag (by Erich Munz, 2006)
BIG THANKS to ERICH !!!!
It does not include many of the more elaborate formatting and parameter options - its a poor main's version - hehe
 // requirements: mysql >= 4.x, phpwcms ver >= 1.2.x 
--------------------------------------------------------------------------------------------
copy this file to phpwcms_template\inc_script\frontend_render
--------------------------------------------------------------------------------------------
FUNCTIONS
Outputs articles in SUMMARY FORMAT (defined in backend) according to date parameter
(1) d=20060729 - YYYYMMDD  - calendar sends this parameter from individual day hyperlinks
in this case outputs articles for a given day
(2) d=200607 - YYYYMM - (no day parameter included) - calendar header (prev - next) sends this parameter
in this case outputs articles for an entire month - similar to monthly archive
(3) if  d=..... parameter is not defined...the script outputs results for the last 30 days
ALSO: paramters can also be sent via embedded links elsewhere in phpwcms - for custom output
--------------------------------------------------------------------------------------------
INSTRUCTIONS
(1) Requires the creation of a separate categories in backend IE alias: show_articles, show_news_articles, etc
(2) Requires an article for that category with the replacement tag {SHOW_ARTICLES:[INT]} to be found within it.
--------------------------------------------------------------------------------------------
USAGE:
--------------------------------------------------------------------------------------------
{SHOW_ARTICLES:0} - returns all articles regardless of category
{SHOW_ARTICLES:2} - returns all articles of category ID (2) 
- good for simple news section 

Special Note: dont forget to sychronize !
{SHOW_ARTICLES:0}  with {SHOW_ARTICLE_CALENDAR:0}  
{SHOW_ARTICLES:2}  with {SHOW_ARTICLE_CALENDAR:2}  
etc..

sending category parameters via GET is on the todo list....
--------------------------------------------------------------------------------------------
*/
The zip provides two php files (one for each tag), a readme and a calendar.css file (that you will need to copy and paste into your installation's default css)

The zip can be downloaded here:

http://www.designjournal.co.nz/wcms/sho ... 8_2006.zip
UPDATED from show_article_calendar.zip
to fix month changeover bug -
now stores the calendar info in a Session.

All best,
:D :D
john

Posted: Mon 31. Jul 2006, 08:36
by fopulu
Can we see a online demo?

Posted: Mon 31. Jul 2006, 15:20
by jsw_nz
Hi Fopulu,

Sorry, everything is now installed on my localhost atm.

I did notice a wee bug.

Over here in New Zealand the month rolled over from July to August - so I added a session feature to store the selection criteria of calendar to maintain state.
I reposted the zip wihich is renamed:

show_article_calendar_08_2006.zip
see original post for link to download

all best,
john :D

CSS

Posted: Sun 24. Dec 2006, 12:03
by Ben_Hook
Could somebody send the zip file; the link is broken and I need the css file...

Posted: Mon 25. Dec 2006, 08:57
by jsw_nz
Should be updated now :)

Posted: Mon 25. Dec 2006, 11:02
by flip-flop
Hi john,

the link is stil broken. :lol:

Merry christmas

knut

Posted: Mon 25. Dec 2006, 11:05
by juergen
All we need is a TLD :D

info ?

com ?

net ?

Posted: Mon 25. Dec 2006, 11:28
by Eggi
i think he is from new zealand
also look the

http://www.designjournal.co.nz/wcms/sho ... 8_2006.zip

:wink:

Posted: Mon 25. Dec 2006, 20:32
by jsw_nz
Sorry guys - my bad

Updated the link (at top) of page -
Eggi is right - was my typo - now fixed

:)

Posted: Fri 29. Dec 2006, 22:40
by Ben_Hook
Thanks! I didn't expect a reply that fast.. but then again i never do :lol: