[SOLVED] Changing/Removing 'New'
|
richsulzmann
Joined: 2009-10-04
Posts: 12 |
Posted: Sun, 2009-10-04 13:46
|
|||
|
Hi, I have done a search on the forum and found some useful information about customizing. Any help much appreciated, thanks. Regards, Rich
|
||||

Posts: 22892
Edit modules/newitems/module.inc
/** * @see GalleryModule::getItemSummaries */ function getItemSummaries($items, $permissions, &$template) { list ($ret, $param) = GalleryCoreApi::fetchAllPluginParameters('module', 'newitems'); if ($ret) { return array($ret, null); } $time = time(); $newTime = $time - $param['days.new'] * 86400; $updatedTime = $time - $param['days.updated'] * 86400; $newString = $this->translate('New'); $updatedString = $this->translate('Updated'); $summaries = array(); foreach ($items as $item) { if ($param['days.new'] > 0 && $item->getCreationTimestamp() > $newTime) { $summaries[$item->getId()] = '<span class="giNew">' . $newString . '</span>'; } else if ($param['days.updated'] > 0 && $item->getModificationTimestamp() > $updatedTime) { $summaries[$item->getId()] = '<span class="giUpdated">' . $updatedString . '</span>'; } } return array(null, $summaries); }Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 16503
Edit modules/newitems/module.inc
Search for "newString" and "updatedString" and change them from:
$newString = $this->translate('New'); $updatedString = $this->translate('Updated');to
$newString = $this->translate(''); $updatedString = $this->translate('');NOTE: If you ever reinstall Gallery or just this module alone you'll need to make these changes again.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 12
Thanks for the replies. Unfortunately I had already tried this and it just removes the graphic as well as the text.
Rich
Posts: 16503
Dave beat me again
How are you putting the image in there?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 12
In themes/carbon/theme.css.....
.giNew { background-image: url('../carbon/images/new.gif'); color: #3F3F3F; } .giUpdated { background-image: url('../carbon/images/updated.gif'); color: #3F3F3F; }...instead of....
.giNew, .giUpdated { border-width: 1px; border-style: solid; padding: 0 6px; line-height: 1.9em; }Posts: 22892
That should work then if you removed the text as in this post:
http://gallery.menalto.com/node/91602#comment-323149
Clear cache?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Hi Dave,
When you say remove the text, do you mean completely removing the text highlighted in bold? I tried this and it didn't work.
Tried the cache too, still the same.
Bit of a puzzler I guess!
Rich
Posts: 22892
Search for "newString" and "updatedString" and change them from:
$newString = $this->translate('New'); $updatedString = $this->translate('Updated');to
$newString = $this->translate(' '); $updatedString = $this->translate(' ');Note: just remove the New and Updated
Then your css should work. If you see text then it is because of cache or you did not edit it right.
Post a URL to your site if you get stuck.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Hi Dave,
I did this earlier and yes the text will disappear, but it also removes the graphic too so nothing is displayed.
Interestingly if I only have ('Ne') then only 2/3rds of the New graphic is displayed, and ('N') about 1/3rd of the graphic.
Site URL is http://www.southernrailwaypics.co.uk/gallery2/main.php
Rich
Posts: 22892
Well since you are using a background image to a <span> tag that is empty then your background image will not show.
Change the text to be spaces or
or add some width the the span or margin might work as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 22892
http://stopdesign.com/archive/2003/03/07/replace-text.html
Posts: 12
Several  's has done the trick, ta!