Module: preformatted URLs (attachment + screenies, yay)

floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-11-16 04:20
kreno wrote:
and all I want is the url to include the photo in my Wordpress page, with an <img> tag.

Have you seen:
http://wordpress.org/extend/plugins/wpg2/

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kreno

Joined: 2007-11-13
Posts: 6
Posted: Fri, 2007-11-16 14:41
floridave wrote:
Have you seen:
http://wordpress.org/extend/plugins/wpg2/

Yes, I have. I didn't want that much Gallery in my pages. I'm using the wp-gallery-remote plugin to view thumbnails, and use lightbox, but I want to be able to get the url of the full sized photo to post.

Kerri

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-11-16 16:10

Install the module, activate the module.
site admin, you will see a link called 'formatted URLs' in the display section.
Click that. This module has the "HTML inline image" checkbox that does give you waht you are after.
save those settings
Edit album -> theme tab, add the 'formatted urls' block where you would like it. ( sidebar or under photo )
save theme settings.
Brows to a image in that album. You will see a box with the options you selected.

Please add directions to the codex page if they are not there and or not detailed enough.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kreno

Joined: 2007-11-13
Posts: 6
Posted: Fri, 2007-11-16 18:58

Dave, sorry, I guess I didn't make myself clear. I have that much working. I have an wordpress app to upload photos to the Gallery for my users. When I'm done, I have the item id, but I would like to show the user the url, so they can use it to post the full sized photo on their wordpress page. (This is a family website, with lots of users posting, that don't have much computer experience.) So, what I want is to have something like this in my wordpress module to get the url from gallery:

$Urls = geturl::getUrlsByItem($item_id);

and that $Urls would then contain an array, including the full-size URL. It seems that this is possible from some of the comments that I've seen posted, but I haven't seen (or figured out) how to do it.

Thanks!
Kerri

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-11-16 19:16

So this module is working but you want something different?

Quote:
I have an wordpress app to upload photos to the Gallery for my users.

Why use a WP application to add items to Gallery?
Now I am confused.
-You dont want to use this module, or it does not do what you want.
-You don't want to use WPG2.
-You want to add images from G2 to WP blog posts, right?

Have you tried: http://g2image.steffensenfamily.com/index.php?title=Main_Page

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kreno

Joined: 2007-11-13
Posts: 6
Posted: Fri, 2007-11-16 20:06

>>So this module is working but you want something different?

I thought from reading these pages that geturls would give me what I want.

>>Why use a WP application to add items to Gallery?
I want to make it easy for my users. They only want to see one web site, but I want to use the gallery to make images easy to maintain. So I've written some code that lets them type in a title and a filename, and it uploads the file to the server, and then it posts it to the gallery in the user's album.

>>-You dont want to use this module, or it does not do what you want.
I thought this module would give me the url via some function. From the comments on these pages, others have used it to display photos on other sites, but maybe I misunderstood and they're copying and pasting the url by hand.

>>-You don't want to use WPG2.
I may have to, but I was hoping to use something more simple.

-You want to add images from G2 to WP blog posts, right?
Yes. I'm using wp-gallery-remote to add thumbnails and display photos with lightbox, but in some cases, the users want to be able to show the full sized image in the blog post, and as far as I can tell, there's no way to link to that with wp-gallery-remote.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-11-17 02:25
Quote:
.......but in some cases, the users want to be able to show the full sized image in the blog post,..........

g2image will do that as well.

Quote:
I have the item id, but I would like to show the user the url,

I think you want a url inside your upload code when you know the itemId?
<img src="http://YOURSITE.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=XXX" />
where xxx is the item Id that you have.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
seek2501

Joined: 2007-11-18
Posts: 3
Posted: Sun, 2007-11-18 19:28

Could somebody please tell me how to modify this plugin so that the thumbnails link just to the image, not the gallery?

(please note that i have no coding knowledge at all)

Thanks in advance. :)

 
seek2501

Joined: 2007-11-18
Posts: 3
Posted: Wed, 2007-11-21 04:23

anyone?

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Wed, 2007-11-21 18:29

At the bottom you get the direct links to the images (download url, url for resized, and url for thumbnail). I think you might have to activate this on the formatted url's site admin page under Miscellaneous Data.

Steve Lineberry

 
seek2501

Joined: 2007-11-18
Posts: 3
Posted: Thu, 2007-11-22 03:27

As far as i can tell, there is no option for a thumbnail which links directly to the image. The only thumbnail option links to the gallery.

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Mon, 2007-11-26 16:02

Using the method I specified, you can get the url of the thumbnail and get the url of the full or resized image (not with gallery around it) and then create your own link.

For example:

An image in my gallery is located here: http://www.thelineberrys.com/pictures/Artistic/Wildlife/HazMat/DSC05240.JPG.html

The url to the thumbnail from this module gives me:
http://www.thelineberrys.com/gallery2/17360-3/DSC05240.JPG

The url to the resized image from this module gives me:
http://www.thelineberrys.com/gallery2/17359-2/DSC05240.JPG

The url to the full image from this module gives me:
http://www.thelineberrys.com/gallery2/17358-1/DSC05240.JPG

So if I want to create a link that goes straight to the full image without gallery2 around it it would look something like this.

[img]http://www.thelineberrys.com/gallery2/17360-3/DSC05240.JPG[/img]

Steve Lineberry

 
skidpics

Joined: 2007-11-06
Posts: 43
Posted: Tue, 2007-11-27 06:01

Unless I missed it - What do I need to edit to add something like : Get your skidpics image fix at skidpics.com after the image link, which in turn will show up below the posted linkage?

-- Skidpics

 
stuporglue

Joined: 2006-06-16
Posts: 10
Posted: Thu, 2007-11-29 04:36

I'd like to make the URL for images visible to users who are not logged in, but I can't seem to make it work. In the admin panel, I have set the "Show URLs available for" toggle to 'Anonymous users', but no luck, the URLs are only visible when I'm logged in. Users who aren't logged in have nothing show up.

Ooops. Nevermind this part. I missed the 'edit album permissions' step from the instructions. Sorry.

Also, if I can make a feature request, it would be to have an option for just the URL, with no tags. On of my sisters uses Xanga and can just paste the straight image URL into the form. I can edit the plugin to do it myself, but it might come in handy for others as well.

Thanks,
Michael

 
bauchi

Joined: 2007-11-11
Posts: 70
Posted: Sat, 2007-12-01 18:15

I thought that it´s about time to work on the localization for this great module.

I´ve started today adding the German language. Just extract the attached file into your 'geturls' folder. Tested on Gallery 2.2.3.

Unfortunately, I´m not qualified to do some more translations into other languages like Spanish or French. But I do hope some of you guys take half an hour of your time to add some more language files to this module. There are just around 50 lines with mostly short 2-3 words expressions that need to be translated, so no big deal. If you don´t know how to compile po-files, you can upload your translations as simple text-files and I will try to do the rest. Thanks.

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Mon, 2008-01-07 23:24

In the albums overview I have under every tumbnail *Get item URL
is it possible to remove this line?
I use theme Carbon, and have only selected the Block for the sidebar.

 
bauchi

Joined: 2007-11-11
Posts: 70
Posted: Tue, 2008-01-08 18:41

To get rid of "Get item URLs" in album view I removed the following lines in module.inc:

Quote:
/**
* @see GalleryModule::getItemLinks()
*/
function getItemLinks($items, $wantsDetailedLinks, $permissions) {
$links = array();
foreach ($items as $item) {
if (isset($permissions[$item->getId()]['geturls.view'])) {
$params['view'] = 'geturls.GetUrls';
$params['itemId'] = $item->getId();
$params['return'] = 0;
$links[$item->getId()][] =
array('text' => $this->translate('Get item URLs'),
'params' => $params);
}
}

It effects that formatted URLs only show up on photo sites. Unfortunately, I´m not using the sidebar in my gallery, so I can´t tell if the Get Item URL-Link still shows up there.

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Tue, 2008-01-08 21:17

Hi bauchi thanks for you're reply.
but it looks that this removes the getItemLinks everywhere.. even on my photopage. (and yes also in the sidebar)
also in Site Admin in can't access the "Formatted URLs" page anymore.

I tested multiple times, and even hit the clear Cache tool.

 
bauchi

Joined: 2007-11-11
Posts: 70
Posted: Thu, 2008-01-10 07:05

Carpatcher, you are right, I removed "get item links" everywhere, cause I didn´t find a better solution to get rid of it in all album sites. But if you add the block "get urls" in photo pages, the number of formatted URLs choosen from site admin is displayed on photo sites correctly so users can copy the links directly for posting the pics in forums or somewhere else. And that was exactly what I wanted for my gallery.
If changes to module.inc don´t effect existing albums, maybe you should create a new one and see what happens.

Just in case you want to try, I´ve attached the module.inc to this post. Works fine in Gallery 2.2.3.

 
Carpcatcher

Joined: 2004-02-02
Posts: 92
Posted: Thu, 2008-01-10 08:27

thanks for youre help,
I added yesterday the notification and tags module. I think i'm going to remove all the action boxes. faster solution ;)

 
cazg

Joined: 2008-01-04
Posts: 22
Posted: Thu, 2008-01-10 15:54

How do I modify the module to include a href back to my site and a tag-line. Example: <a href="new.photocaket.com"><img src="my gallery image">Buried at photocasket</a>
TIA

There are no stupid questions, only stupid children.

 
cazg

Joined: 2008-01-04
Posts: 22
Posted: Sun, 2008-01-13 09:11

Nevermind. I figured it out.

There are no stupid questions, only stupid children.

 
justinj1

Joined: 2005-11-21
Posts: 67
Posted: Sun, 2008-01-13 13:16
bauchi wrote:
I´ve attached the module.inc to this post.

Been waiting a long time for that fix :D

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Sun, 2008-01-13 14:37

cazg, can you tell me how you added the tagline? I'd like to do that too, thanks.

 
cazg

Joined: 2008-01-04
Posts: 22
Posted: Sun, 2008-01-13 19:02

Adding tag-lines: Ours is Buried at PhotoCasket.com.

I would rather send you the code than explain encoded HTML. You can just copy and paste, then change your tag-line.

Caz

http://new.photocasket.com

There are no stupid questions, only stupid children.

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Sun, 2008-01-13 19:08

Okay, u can make an attachment here or send it to me at:

 
geniestar

Joined: 2008-01-15
Posts: 6
Posted: Tue, 2008-01-15 07:19

hello i seem to be having a problem
i installed the module in the right directory but am getting a version error as followed
Incompatible module!
Core API Required: 6.10 (available: 6.8)
Module API Required: 2.4 (available: 2.0)

am i just S.O.L.?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-01-15 14:50

you need to upgrade gallery

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
metphoto.us

Joined: 2006-08-15
Posts: 10
Posted: Wed, 2008-01-23 23:35

Is it possible to:

1.) add a file extension just before [/IMG] in the bbCode? My images will need to be posted in a vBulletin forum and it won't recognize image files without a .jpg or .gif extension.
2.) give the url for a resized version rather than the full image?

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Wed, 2008-01-23 23:52

the bbcode works fine for my images when posted in a vbulletin

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Thu, 2008-01-24 14:15

1. You need to have url rewrite turned on to get the jpg and gif extensions
2. yes, it's possible, see my posts on 11-21-07 and 11-26-07 on this page.

Steve Lineberry

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Thu, 2008-02-07 15:42

hey guys,
Been a using preformatted URLs module for a month now and love it. However, for some reason when I add new pictures, the preformatted URL option is not available for these new items (not all, just some).

Any idea what I need to do? Do I need to delete cache or something? Thoughts?

Here are two images just uploaded (one has the urls and the other doesn't):

Correct: http://www.ww2incolor.com/german/jager-patrol-unit.jpg

Missing URLs: http://www.ww2incolor.com/german/marder1-75mm.jpg

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Fri, 2008-02-08 16:00

Hey shocksll,
Any clue with my question above? If not, I'll post another message in the forum outside of this thread. Thanks!

 
cazg

Joined: 2008-01-04
Posts: 22
Posted: Mon, 2008-02-11 16:39

Caz

There are no stupid questions, only stupid children.

 
denney
denney's picture

Joined: 2007-05-30
Posts: 12
Posted: Mon, 2008-02-11 04:04

I'm having a small problem with the image path generation... I used an embedded gallery with URL rewrite and this is my setup:

/gallery2/ - Folder containing Gallery2 installation
/gallery/%itemID%-%serialNumber%-%fileName% - The URL rewrite rule for item views.

Now, the clickable URLs are generated properly (eg. http://www.mantrasoftware.net/gallery/carpentry/dollshouse/IM000658.JPG.html) but the IMAGE URLs are generated incorrectly (eg. http://www.mantrasoftware.net/gallery2/gallery/59-2-IM000658.JPG).

As you can see, the image URL is using "/gallery2/gallery/" when it should be just "/gallery/". Is there anyway to fix this small issue?

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Mon, 2008-04-14 12:42

I've been thinking of a way of displaying permalinks on pages - rather than starting from scratch do you think this module could be modified to also include an option for displaying these?

 
flaystus

Joined: 2008-06-15
Posts: 1
Posted: Sun, 2008-06-15 17:11

Is it possible to make this plugin work with the mp3 plugin? So it spits out a forum formatted html link to embed a song?

 
Burnspot

Joined: 2009-03-09
Posts: 3
Posted: Wed, 2009-03-18 14:39

I have a Drupal site with G2 embedded and I'm using this module. I have URL rewrite functioning; however, when I want to show the direct link to the image, I always end up with something that ends with "xxxxxx.image.jpg.html". How can I get the "html" bit dropped from that? I'm a doing something wrong with my rewrite rules? I pretty much have all miscellaneous options turned on as well as all the "show link" options.

Burnspot

 
ttkingdom

Joined: 2007-08-25
Posts: 8
Posted: Sat, 2009-04-11 09:31

I've just done a small trick to disable the get urls box in itemSummaries for albums.

Look for this code around line 13 in /modules/geturls/templates

{elseif (!empty($blockToggle)}

change it to

{elseif (!empty($blockToggle) && $GetUrlsData.isPhoto)}

I myself feel it is ridiculous for album to be view by thumbnail and linked, an URL is enough :D

 
justinj1

Joined: 2005-11-21
Posts: 67
Posted: Fri, 2009-10-09 18:42

Summary:
Trying to give people HTML (for Myspace) and BBCode (for forums) so they can hotlink the full size image, and the image is a link back to the homepage.

Detail:
I installed the modified code here: http://gallery.menalto.com/node/28154?page=4#comment-209552

Now I have the option for "HTML Full to View / Width Tag" which lets people hotlink the full size image and the image is a link back to the item page. I edited the code as suggested here:
http://gallery.menalto.com/node/28154?page=5#comment-214509

However that's off, looks like it's line 229 that needs to be edited, this part:
{g->text text="HTML Full to View / Width Tag:"}
<br />
<input onclick="this.focus(); this.select();" name="forum" type="text" readonly="true" size="{$width}" value="&lt;a href=&quot;{g->url arg1="view=core.ShowItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}

The GetURLs.tpl code is here: http://cityviewterrace.org/Support/GetUrls.txt

By changing part of line 229 to {g->url arg1="" forceFullUrl=true} it makes the image a link back to the main gallery page, albeit crudely, The URL it creates is http://cityviewterrace.org/gallery/main.php?g2_=

Sample gallery page: http://cityviewterrace.org/gallery/v/11_truckart495.jpg.html *Warning NWS ads*

I can Paypal someone to get it working then (if they allow it) post the code here.

Thx for this module

 
justinj1

Joined: 2005-11-21
Posts: 67
Posted: Tue, 2009-07-14 10:59

Attached is edited module to do the above :)

 
kdji123

Joined: 2009-05-05
Posts: 24
Posted: Fri, 2009-10-09 15:14

how to use this module with embede gallery,for example in joomla

 
Confuzzelled

Joined: 2007-05-14
Posts: 12
Posted: Fri, 2010-02-05 08:59

Need a single BBCode URL under the image date but above the "Get URLs" toggle box. I see the "Quick URLs" text in GetUrls.tpl, but can't figure out how to make it work.

I also need the clickable thumbnail to link to the ITEM ONLY, not the album page, just the individual image.

 
xymotic

Joined: 2007-09-19
Posts: 5
Posted: Mon, 2010-08-23 05:53

Hi Everyone. I hope this is not a RTFM question but I can;t seem to find it.

Is there a way to get this plugin to display the bbc code for the direct image url of ALL of the pictures in an album rather than a link to the album page?