-
AuthorPosts
-
wogand Friend
wogand
- Join date:
- May 2008
- Posts:
- 112
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 21
- Thanked:
- 3 times in 1 posts
July 19, 2008 at 10:59 am #131060The albums of mine has been showing for 2 months now. When will the status “new” disappear?
When I add an album I want it to be shown as “new” for like a few weeks or so after that the word new must disappear.
Is it also possible when I added new pictures to an existing album it gets the status “updated”?
Hope you can help.
Regards
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 21, 2008 at 8:38 am #261110Hi
you can see that ststus in gallery.php(componentscom_rsgallery2templatesja_semantichtml folder)
Those lines :
<span class='rsg2-galleryList-newImages'>
<sup><?php if( $this->gallery->hasNewImages() ) echo _RSGALLERY_NEW; ?></sup>
</span>wogand Friendwogand
- Join date:
- May 2008
- Posts:
- 112
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 21
- Thanked:
- 3 times in 1 posts
July 21, 2008 at 4:09 pm #261229yes, but that isn’t an answer to my question.
I found out the following in “includes/gallery.class.php”
function hasNewImages(){
global $database;
$lastweek = mktime (0, 0, 0, date(“m”), date(“d”) – 7, date(“Y”));
$lastweek = date(“Y-m-d H:m:s”,$lastweek);
$database->setQuery(“SELECT COUNT(1) FROM #__rsgallery2_files WHERE date >= ‘$lastweek’ AND gallery_id = ‘{$this->id}'”);
$database->query();
return (bool) $database->getNumRows();Here it says after 7 days the status NEW should disappear. Howcome I still have status new? It has been months now…is the code above correct??
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 22, 2008 at 2:27 am #261296Hi
You must change like this
function hasNewImages(){
global $database;
$lastweek = mktime (0, 0, 0, date("m"), date("d") - 7, date("Y"));
$lastweek = date("Y-m-d H:m:s",$lastweek);
$gid=$this->id;
$database->setQuery("SELECT * FROM #__rsgallery2_files WHERE date >= '$lastweek' AND gallery_id = '$gid'");
//echo $database->getQuery();
$database->query();
return (bool) $database->getNumRows();
}
And in gallery.php(componentscom_rsgallery2templatesja _semantichtml folder)
Change from :
<span class='rsg2-galleryList-newImages'>
<sup><?php if( $this->gallery->hasNewImages() ) echo _RSGALLERY_NEW; ?></sup>
</span>
to
<span class='rsg2-galleryList-newImages'>
<sup><?php if( $kid->hasNewImages() ) echo _RSGALLERY_NEW; ?></sup>
</span>1 user says Thank You to Sherlock for this useful post
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 22, 2008 at 2:30 am #261297<blockquote>Is it also possible when I added new pictures to an existing album it gets the status “updated”?</blockquote>
you can change “new ” to “updated” as you want by edit english.php(administrator/components/com_rsgallery2/language/ folder)
Search this line :
DEFINE("_RSGALLERY_NEW", "New!");
Change to
DEFINE("_RSGALLERY_NEW", "Updated!");
1 user says Thank You to Sherlock for this useful post
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by wogand 16 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum