I've installed Gallery on ModX revo.
[[Gallery? &album=`My Album`]]
works quite ok - I get privew of all pics in albaum. But
[[GalleryAlbums? &limit=`10`]]
returns nothing. But why? I get 2 albaums in my gallery. Asked on ModX froum but no success. Any ideas?
OMG, albaums must be set in "Prominent" status.
Related
I have a getResources call that shows 6 items on my homepage:
[[!getResources?
&tpl=`homepageInventoryCellTpl`
&parents=`4`
&resources=`-33`
&depth=`10`
&limit=`6`
&includeContent=`1`
&includeTVs=`1`
&processTVs=`0`
&hideContainers=`1`
&showHidden=`1`
&debug=`0`
&sortbyTV=`vehicleonhomepage`
&sortDirTV=`DESC`
]]
it does work showing 6 thumbs [for vehicles] but it shows the same thumb for each vehicle!
The output tag looks like:
<img class="img-responsive"
src="
[[!phpthumbof?
&input=`[[!++gallery.files_url]][[!getgalleryAlbumCover?
&id=`[[!+tv.vehiclegallery]]`]]`
&options=`&w=300`
]]"
/>
Note that nothing is cached [!]
getResources does work correctly and returns six different images if I remove the phpthumbof bit
I've cleared all the different caches several times
[[!++gallery.files_url]] just returns the gallery path [/assets/gallery/]
[[!getgalleryAlbumCover? &id=`[[!+tv.vehiclegallery]] returns the actual name of the album cover
the /assets/components/gallery/cache/ directory is writable.
Why is it showing the same thumb for all 6 vehicles?
I had the same problem. In the end I removed phpPhumbOf and installed pThumb and problem disapeared.
I cannot figure out how to get URL of current site in Liferay. For example if i have created four sites - site1, site2, site3, site4. URL of this sites will be:
http://localhost:8080/web/site1/
http://localhost:8080/web/site2/
http://localhost:8080/web/site3/
http://localhost:8080/web/site4/
But how can i get this URLs from velocity (in theme)? I tried few options:
$themeDisplay.getPathFriendlyURLPublic() - /web
$themeDisplay.getPortalURL() - http://localhost:8080
$themeDisplay.getURLHome() - http://localhost:8080/web/guest
$themeDisplay.getURLCurrent() - /web/site1/home
I need to get just http://localhost:8080/web/actualsite/.
All right, after few hours of trying I find solution:
To get current site url, you need to use:
$layout.getGroup().friendlyURL in velocity.
This expression returns '/site-name' format.
Try this in your theme vm. This should give you current complete url.
$portalUtil.getCurrentCompleteURL($request)
Output : http://localhost:8080/web/site4/home
If anyone has managed to get locally uploading images I'd be mightily appreciative of some help.
I've downloaded the latest version of nicEdit along with the nicUpload plug in (from nicedit.com - Version 0.9 r24 released June 7th, 2012).
I've also downloaded nicUpload.php from http://svn.nicedit.com//trunk/nicUpload/php/nicUpload.php
NicUpload.php - I've set NICUPLOAD_PATH and NICUPLOAD_URI both to 'images' which is the subfolder of where nicupload.php and nicEdit.js are located.
NicEdit.js - I've added the following to line 271:-
uploadURI : 'nicUpload.php?id=123',
I've given it an ID otherwise it was failing with an invalid ID code. But the ?id=123 isn't meant to be there. I've also set the iconsPath accordingly.
Line 1370 I've switched this:-
nicURI : 'http://api.imgur.com/2/upload.json',
for this:-
nicURI : 'http://www.mydomain.com/nicedit/nicUpload.php',
But I'm still getting "Failed to upload image". I've searched and searched and searched for answers to this and I'm getting close to having spent two days tinkering with it.
With a few debugging displays I can see that it's failing on line 46 of nicUpload.php where it says:-
$file = $_FILES['nicImage'];
$image = $file['tmp_name'];
$max_upload_size = ini_max_upload_size();
if(!$file) {...
That last IF is true and that's where it exits with the error.
Appreciate anyone being able to help.
The nicUpload.php script file laying around sucks and I don't even understand how it could work.
NicEditor uses imgur as the default image upload service. The source code follows the API format described here: http://api.imgur.com/resources_anon#upload
My suggestion would be to implement the API request and response defined there.
I did not use the niceedit upload function to do what you want. I managed to add a button to the link and img dropdown menu. The button opens a file manager window where you also can upload. I managed to put then de url of the image or document into the nicedit drop down img or url window. That is how I solved the problem.
I'm trying to get urls off a page that has this sort of code repeated-
<a onmouseout="swho.alone.OnMouseOut(event)" onmouseover="swho.alone.showPopup(event, 'DR647E481', 'pra**', '', '', 'everyone', 'closed')" href="/SWApp/detailAction.do?key=DR647E481&search=pra**&soundex=&stanfordonly=&affilfilter=everyone&filters=closed">Ajay Prakash</a>
using this code in Jquery - $jq("#PublicResults a[href]")
For some reason when I call $jq("#PublicResults a[href]").text() I get Ajay Prakash.
I'm not sure why and I'd like to know why.
But more than that, I'd like to know how to get only the URL.
Thanks for the help!
EDIT-
OK, the response below is giving me an undefined in the firebug console and I'm not sure why- to overcome that I tried -
$jq("#PublicResults a[href]").attr("href")
which gives me only the url for the page that I'm on, as opposed to all of the links - any idea why?
Try (not tested) -
$jq("#PublicResults a").attr("href")
I'm using Feedzirra to get some rss content. This content can be updated by a third person. In my controller I have the following code:
RSS_FEED = "http://xxxxxxxx.wordpress.com/category/my_category/feed/"
my_feed = Feedzirra::Feed.fetch_and_parse RSS_FEED
#my_feed_text = my_feed.entries.first.sanitize! if ( my_feed && my_feed != 0 )
Eveything works fine until someone update the content of the only article in the my_category category...I'm getting the old content again and again. I try to put the RSS_FEED url in a browser and I get the new content...but in my application (also tried in rails console) I keep getting the old content.
Any hint?
Apparently the problem was with the refresh of wordpress rss. Today is working fine, the change is visible within 5-10 minutes.