Re: What is the legal way to add new images into the custom theme and articles?

Glen Mazza <[email protected]>
Newsgroups gmane.comp.java.roller.user
Message-ID <[email protected]>
Greetings, the theme management files (including images) are kept 
separately from Media files.  (Our Media File implementation is actually 
much newer than the themes.)  Normally, you would just place the new 
images in your theme's images folder, like here for fauxcoly: 
http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/fauxcoly/images/ 
and reference them as fauxcoly does, and rebuild Roller.  We have many 
other themes listed in the Links to non-Apache resources here: 
https://cwiki.apache.org/confluence/display/ROLLER/Roller+Wiki 
<https://cwiki.apache.org/confluence/display/ROLLER/Roller+Wiki%3bjsessionid=1668961A2C7DE83AA43908A74478D53E> 
that may be able to provide other ways to reference images into your 
custom template.

You can link to media files from your templates, but you would need to 
use the Media Files URL given to you once you add the graphic into your 
Media Files, as I do with my company's logo on my blog ( 
http://www.jroller.com/gmazza/ - not part of the theme, but shows up due 
to the image link.)  If you choose to go this route, you'll want to do 
template modifications after you create your blog with your custom 
template (using Roller's template modification screens all bloggers are 
provided with), after getting the Media file URLs.

It depends on what you want to do.  If this graphic is something that 
will change from blogger to blogger, let each blogger use Media files to 
incorporate what he wants; if this is a graphic that will be the same 
for all bloggers using your theme, don't use Media Files but just 
incorporate it into your theme's image folder.

Glen

On 01/12/2014 02:31 PM, user wrote:
>
> Hello fellows! First of all thanx to all developers and customizers of 
> this well-designed open source web application.
> What I'm trying to do is to add an image into my custom theme.
> First of all I have created a copy of "fauxcoly" theme and then 
> started to study it's content. In "Media Files" chapter of my weblog I 
> saw the folder named "icons". In this folder I saw the file named 
> "asf-logo.png". In "Templates" chapter in the template named 
> "standard_footer" I obtained the following tag:
> <img src='$url.resource("icons/asf-logo.png")' border="0" alt="Apache 
> feather" />
>
> And on the rendered web page I see the link related to this tag:
> http://127.0.0.1:8080/roller/main/resource/icons/asf-logo.png
>
> So I decided to link my uploaded images from my custom theme either by 
> "$url.resource" method or by direct link:
> http://127.0.0.1:8080/roller/main/resource/images/asf-logo.png.
>
> Then I add the image named "asf-logo.png" from Tomcat's "webapps" 
> folder using "Media Files" chapter of admin UI. I preserved the 
> current filename ("asf-logo.png") and assigned the folder "images" for 
> it. So I have got two identical files: one in the directory named 
> "icons" and another in the directory names "images". Then I'm trying 
> to access new uploaded file by the url:
> http://127.0.0.1:8080/roller/main/resource/images/asf-logo.png
>
> And get 404 error, although the initial url works OK:
> http://127.0.0.1:8080/roller/main/resource/icons/asf-logo.png
>
> Accessing file by the model object "$url" don't work either.
> What I do wrong? Why is so different behavior for user uploaded files 
> and files copied automatically from default theme?
> Tested on 5.0.1 and 5.0.3 under Tomcat 7.0.27 under OpenJDK 1.7.0_25
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.