Quick one. What should I do to be able to automatically have anything starting with "http://..." become a live link in the photo descriptions (and album description)?
thanks Dave - uploaded the module to my gallery module folder, but I cannot see it listed in the admin/modules. Do you know what might be wrong? It's located in:
modules/purifier
thanks,
gab
jnash
Joined: 2004-08-02
Posts: 669
Posted: Fri, 2012-05-18 18:43
It should be listed as 'HTML Purifer" If it's not listed check to ensure you didn't accidentally unzip it within the purifier director... (wrong = modules/purifier/purifier) If you're good there, and it still doesn't show, check that the directory is read/write/execute by the user the web server runs as.
gabstero
Joined: 2010-01-06
Posts: 51
Posted: Fri, 2012-05-18 18:53
thanks -
of course I unzipped it in the /var/modules folder. Copied them in the right folder and pronto they show up in my module!
Dave: tried with the <a href... etc. It works like that but not without it.
suprsidr - added the script in the head section of the page.html.php - no work
thanks for the help!
g
gabstero
Joined: 2010-01-06
Posts: 51
Posted: Tue, 2012-05-22 15:31
suprsidr - I take that back. It works in the description located on the right of the picture, but not the one underneath the pic. You know which page should I tweak for that to change?
the trouble is that purifier doesn't do anything to my links
g
gabstero
Joined: 2010-01-06
Posts: 51
Posted: Tue, 2012-05-22 16:33
and the space didn't help either... The purifier is currently disabled - still getting double links though.
suprsidr
Joined: 2005-04-17
Posts: 7939
Posted: Tue, 2012-05-22 16:35
purifier allows you to use html, so format your links like: <a href="http://www.actual-link.com" target="_blank">Link text</a>
to help you can use the wysiwyg editor.
Posts: 26107
http://codex.gallery2.org/Gallery3:Modules:purifier
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 51
thanks Dave - uploaded the module to my gallery module folder, but I cannot see it listed in the admin/modules. Do you know what might be wrong? It's located in:
modules/purifier
thanks,
gab
Posts: 669
It should be listed as 'HTML Purifer" If it's not listed check to ensure you didn't accidentally unzip it within the purifier director... (wrong = modules/purifier/purifier) If you're good there, and it still doesn't show, check that the directory is read/write/execute by the user the web server runs as.
Posts: 51
thanks -
of course I unzipped it in the /var/modules folder. Copied them in the right folder and pronto they show up in my module!
But - how do I configure the purifier?
thanks,
g
Posts: 51
Ok - with the purifier installed - my links in the description aren't live: http://www.mamaliga.com/gallery3/index.php/BBA/bread
am i doing something wrong?
thanks!
g
Posts: 26107
New links?
or are you doing html like:
<a href="http://example.com">link test</a>Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7939
Without adding the weight of a full module, you can add thie javascript to your page.html.php:
<script type="text/javascript"> $(document).ready(function() { var h = $('ul.g-metadata>li:contains("Description:")').html(); if(h) $('ul.g-metadata>li:contains("Description:")').html(h.replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi, '<a href="$1" target="_blank">$1</a>')); }); </script>-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 51
Dave: tried with the <a href... etc. It works like that but not without it.
suprsidr - added the script in the head section of the page.html.php - no work
thanks for the help!
g
Posts: 51
suprsidr - I take that back. It works in the description located on the right of the picture, but not the one underneath the pic. You know which page should I tweak for that to change?
thanks!
Gabstero
Posts: 26107
That would be expected as it is HTML.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7939
you have to perform the operation on that element too:
<script type="text/javascript"> $(document).ready(function() { var h = $('ul.g-metadata>li:contains("Description:")').html(); if(h){ $('ul.g-metadata>li:contains("Description:")').html(h.replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi, '<a href="$1" target="_blank">$1</a>')); $('#g-info').html(h); } }); </script>-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 51
thanks Dave - but I thought the purifier would do that.
suprsidr - it worked but the link has a "</div>" after it for some reason. See here: http://www.mamaliga.com/gallery3/index.php/BBA/bread
thanks!
Posts: 7939
you need a space after your link
But it looks like you are using purifier, so you don't need the javascript.(you'll get double links)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 51
the trouble is that purifier doesn't do anything to my links
g
Posts: 51
and the space didn't help either... The purifier is currently disabled - still getting double links though.
Posts: 7939
purifier allows you to use html, so format your links like:
<a href="http://www.actual-link.com" target="_blank">Link text</a>to help you can use the wysiwyg editor.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 51
that's fine - thanks... I just thought you could do the same thing as you can in photo description on flickr.
g.
Posts: 7939
I updated the above javascript, I was being lazy earlier and just copied/pasted fixed now.
I ran into this myself(long time ago), maybe you needed a carriage return instead - don't remember.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2