Return-Path: X-Original-To: apmail-roller-user-archive@www.apache.org Delivered-To: apmail-roller-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 940A610928 for ; Sun, 12 Jan 2014 21:49:34 +0000 (UTC) Received: (qmail 37769 invoked by uid 500); 12 Jan 2014 21:47:28 -0000 Delivered-To: apmail-roller-user-archive@roller.apache.org Received: (qmail 37144 invoked by uid 500); 12 Jan 2014 21:46:55 -0000 Mailing-List: contact user-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@roller.apache.org Delivered-To: mailing list user@roller.apache.org Received: (qmail 37066 invoked by uid 99); 12 Jan 2014 21:46:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jan 2014 21:46:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of glen.mazza@gmail.com designates 209.85.128.53 as permitted sender) Received: from [209.85.128.53] (HELO mail-qe0-f53.google.com) (209.85.128.53) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jan 2014 21:46:27 +0000 Received: by mail-qe0-f53.google.com with SMTP id t7so6386058qeb.26 for ; Sun, 12 Jan 2014 13:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5oJWhb89sGks/81hh69vPRWUkRVOvkKUai3o0kP+aso=; b=jUZcgsYr0w6AuGXWZVDhUPsRg7Q6rzCylBeWRSASkShH1d9GBjYtOz8ksphZEJuBSz xchsZldcqx+kDCdDatafy+6ojZIvC+FnuV9BNrs4qflFkSHVtGil/F3K5jT7wlQaRnz4 zKn1oHtRZYjod8K1vazVOqRdoeP/34/XXDdyz9ulrD/s//9JF2wqWAMRh2EkhNQU3hPJ 9qwVthWnxT9hzM8AwQT1/QQHUVqHJg9vF2pUwHq+rkgUxfuSDtRIJgYvgro1VckBx0ZU jE4bJHtYJpsJ22ZRirUuxFhWAfOpm401BXcx9otphs83HM8eBVlktbWnf9D2lafOMwgm 2CJQ== X-Received: by 10.224.38.10 with SMTP id z10mr32697635qad.36.1389563166290; Sun, 12 Jan 2014 13:46:06 -0800 (PST) Received: from [192.168.1.47] (pool-71-191-229-82.washdc.east.verizon.net. [71.191.229.82]) by mx.google.com with ESMTPSA id nk1sm24960366qeb.8.2014.01.12.13.46.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 Jan 2014 13:46:05 -0800 (PST) Message-ID: <52D30D1D.9050509@gmail.com> Date: Sun, 12 Jan 2014 16:46:05 -0500 From: Glen Mazza User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: user@roller.apache.org Subject: Re: What is the legal way to add new images into the custom theme and articles? References: <52D2FAF9.5060102@gmail.com> <1389562454.135292.19898.28699@mail.rambler.ru> In-Reply-To: <1389562454.135292.19898.28699@mail.rambler.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 01/12/2014 04:34 PM, user wrote: > > Thank you Glenn for your quick and descriptive answer. As I have > understand from your answer the legal way of referencing to "Media > Files" content from articles and from custom themes is to use link > (URL) shown on "Media File Editor" window, isn't it? Yes. > If so, I have got two questions: > 1) The link is looks like "cb06345c-1202-4c46-bbbe-a95c9f1fb004" and > this is almost unreadable by user. So if I have several images > included in the editable article I can become confused during editing > by what each link actually means. Is there any way to address images > by the value of "Name" field which is present in "Media File Editor" > or any other user-friendly view? I agree with you on that point, the cryptic URLs can cause confusion when working with them, I assume their main purpose is to guard against multiple files being given the same name. I blog with the old Roller 3.1 that gave user-friendly URLs for links (it didn't have the advanced media file functionality, just simple file uploads though). I don't know of a way to fix that, perhaps other team members would. > > 2) What is the actual dedication of "$url.resource" method which is > described in the template guide as "String URL of uploaded file > resource in weblog"? I'm not sure -- can you paste it in a blog header (modify your template) and see what it resolves to? (That, or check the Roller source code--sorry, I haven't done much with media files, hopefully someone else can help you here.) Regards, Glen > >> Пн. 13 янв. 2014 00:29:25 пользователь Glen Mazza >> (glen.mazza@gmail.com) написал: >> >> 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 >> >> 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: >> > > 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 >> >>