Using "New Items Module" in G2 modules.
Wondering the following. Right now the module shows "New!" as text, is it possible to replace it with an image, lets say new.gif. I tried grep-ing myself and editing the line yet it gave me a parse error. If you could give me a bit of guidance, I'd appreciate it
Posts: 32509
modules/newitems/module.inc
find
replace by your own html.
with css / js you could replace the innerhtml of the giNew classes with an image. or just with css, you could set a background image .giNew. but it will still display the string over the background.
that's why you'll have to edit the source code...
Posts: 100
This is what I tried:
$newString = $this->'<IMG SRC="http://www.mysite.net/img/new.gif">');
$updatedString = $this->translate('Updated');
Parse error: parse error, unexpected '<', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/d3v/public_html/mambo/g2/modules/newitems/module.inc on line 144
please give some hints vallaint :x
Posts: 32509
lol, sorry, but that code looks very funny
replace
with
maybe you also want to get rid of the <span> ... </span> around the <img .../> tag.
Posts: 100
my code wasn't that off :roll:
thanks for both tips. replaced the text with image and removed the border. thanks once again.
Posts: 314
d3vlabs, just FYI - it started as a gif. Then there was a request to have new/updated obey the language... that's when the gifs were out, and the text was in As my uncle used to say - new is well forgotten old
Posts: 100
big ups to your uncle virshu
Posts: 378
virshu,
I remember the problem. Could we maybe add some kind of graphical element with the text so that it looks less "raw" ?
Posts: 100
the fix works just fine and takes a minute to apply. leave it as it is and focus on bigger issues :x
Posts: 378
I agree, it is not a priority, but since Gallery represents a huge improvement on G1 as far as look and feel is concerned, it would be a shame not to expect the same quality from the modules (at least those provided with G2).
Posts: 314
Lapinoo, I am complete idiot to decide what looks more or less "raw" or what look and feel is shameful. So, if you (or anybdody else) can suggest a CSS example of what you mean - I'll be happy to put it in (probably after release)...
Posts: 378
virshu,
I was thinking of something like the image frames we use for albums and photos, some kind of graphical frame in which we could display some text (instead of a picture). That would be almost as nice as the original gif that was used, but this we can translate the text!
Anyway, this would not just be a CSS based solution, I don't know if there would be a problem to implement it.
Posts: 100
what did I do....
Posts: 22
It would also be a good idea to use just a simple image border for new or edited images.
In my gallery I don't use picture frames and this way it would be nice to see a litte border around new or modified images.
Maybe the clolour can be defined using css.
[span class="giNew"][img src=".."][/span]