Page 1 of 1

improved: function.recently_updated.php (v1.1)

Posted: Sat Oct 21, 2006 6:46 pm
by olaf_noehring
Hi

I added a few more parameters, new now (of course can be used with old parameters and combined):

(optional) leadin='Last changed' - Text to show left of the modified date.
(optional) showtitle='true' - Shows the titleattribute if it exists as well (true|false).
(optional) css_class='some_name' - Warp a div tag with this class around the list.
(optional) dateformat='d.m.y h:m' - default is d.m.y h:m , use the format you whish (php -date- format)

rename the file to
function.recently_updated.php
and place it in the plugins folder (overwrite the old file)

Olaf

[gelöscht durch Administrator]

Re: improved: function.recently_updated.php (v1.1)

Posted: Tue Jul 24, 2007 11:44 am
by Traill
I noticed that a page that has been recently been updated does NOT appear in the list if you have not selected it as "Active in Menu"... is there any way around this? I don't want every single one of my pages available through my menu in order to have to make it appear in the list...

Any ideas welcome! Thanks :)

Re: improved: function.recently_updated.php (v1.1)

Posted: Tue Jul 24, 2007 11:48 am
by RonnyK
For that you should change the function, as it now states:

Code: Select all

$q = "SELECT * FROM ".cms_db_prefix()."content WHERE (type='content' OR type='link')
AND default_content != 1 AND active = 1 AND show_in_menu = 1 
ORDER BY modified_date DESC LIMIT ".$number;
so both "active" and "show_in_menu" need to be set. If you just delete the part to make the pages visible as well.

Ronny

Re: improved: function.recently_updated.php (v1.1)

Posted: Wed Jul 25, 2007 11:54 am
by Traill
That's excellent news! Thanks so much RonnyK - can I ask quickly how exactly do I change its function?
I've not done this before but once I've done this once I'll be able to play around with others... :)

Re: improved: function.recently_updated.php (v1.1)

Posted: Wed Jul 25, 2007 11:59 am
by RonnyK
If you download the file mentioned in the earlier post, and rename it to .php (so remove the .txt at the end), you can just edit the code in a texteditor, notepad f.e.
After having changed the code, you can upload (FTP) it to the PLUGINS-folder of your CMS. That will overwrite the existing file. The new file is than active and usable.

Basically all modules are stored in folders that have the module-name under the folder Modules.
Tags are stored in the folder Plugins.

In both folders are a lot of .php files stored, that can be changed in an editor and the changed code can be uploaded back. I would backup the original function if I were you, so that you can set back the original if needed.

Ronny

Re: improved: function.recently_updated.php (v1.1)

Posted: Wed Jul 25, 2007 12:18 pm
by Traill
Brilliant. I used notepad and it's all sorted now, perfect.

Thanks so much mate, really appreciate your help! :)