Module: preformatted URLs (attachment + screenies, yay)

valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-10-31 23:53

you'll need a database management program like phpmyadmin to do that.

most webhosts offer phpmyadmin in the cpanel / admin panel of your website / domain.

 
FastZ
FastZ's picture

Joined: 2005-05-09
Posts: 26
Posted: Wed, 2006-11-01 00:36

I can access my MySQL databases. What do I need to do exactly?

EDIT: Nevermind, I fixed it. Just deleted the one entry that I found in my gallery db that pertained to GetURLs. Fixed it, module installed! Thanks.

Edit #2: That's exactly what I was looking for but not. I need the actually link to the picture itself to end with ".jpg" or ".gif". Example: "gallery.com/albums/picture.jpg", not something like "gallery.com/main.php?g2_view=core.DownloadItem&g2_itemId=7477&g2_serialNumber=2". That would be fine if all that php stuff in the url ended with .jpg though, but it doesn't so it cant work on the forums I need it to.

Can that be configured using Mod Rewrite? If so, how do I do that?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-01 01:37

yes, you need to enable the rewrite module if you want nice urls.

 
FastZ
FastZ's picture

Joined: 2005-05-09
Posts: 26
Posted: Wed, 2006-11-01 20:30

My URLRewrite module doesn't seem to work and as far as I know, I cant modify the apache settings on my webserver because Im on a Powweb-hosted hosting plan.

When trying to configure the URLRewrite module on my gallery, I get the following output with no options to choose from, no nothing.

Apache mod_rewrite
The Apache mod_rewrite module is installed on most Apache servers by default. If you are unsure of what method you should choose then select this. Gallery will try to detect if your server supports mod_rewrite.

PHP Path Info
Using Path Info is supported by most systems. With this method Gallery parses the URL itself during the request.

It is recomended that you don't activate the 'Download Item' URL since it will slow down Gallery.
Block hotlinking is not supported.

I understand this is off-topic from what this thread is about so I will post my problem in a topic on the Powweb forums.

Thanks for helping me get this far. I appreciate it.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-01 20:58

powweb is a certified gallery webhost and as such it should support all gallery features as well as offer support if something doesn't work.

please contact them about this issue

for future reference, also note that this is a development forum and not a support forum.

 
Nomina

Joined: 2006-09-05
Posts: 1
Posted: Thu, 2006-11-02 00:58

What changes to the GetURLs.tpl (or other files) would be necessary to cause the "R2F" code to link back to the Image's Gallery page as opposed to the original image itself? Our gallery is intended as a sort of secondary citation/credit mechanism, so we need to have posted images link back to their gallery page where their relevant citation information is displayed.

Presently, all links appear in the following format:

http://yourdomain.net/gallery2/d/169-1/image.jpg

but I'd like them to use the "view" URL instead. Hence:

http://yourdomain.net/v/art/image.jpg.html

I imagine it's a simple matter of substituting the right smarty tag, but as I'm still rather new at tweaking G2's code to my liking, I'm often at something of a loss when it comes to discovering which particular tags do what.

Many thanks in advance,
n.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Sat, 2006-11-18 05:26

Shortly after posting last, I dug around in the code and managed to modify it create new/multiple types so that I could link FROM whatever I felt like TO whatever I felt like with appropriate control. I've been getting updates here and there but life has been crushing me so no time to respond until now.

Here in this post I'll try to elucidate the steps I took with code excepts and so on. I prefer this approach to just zipping up my files and posting them here. I built off of the 2006/01/14 and added the Coquesvas file, all for use with Gallery 2.1.2. Hopefully by sharing the how of what I learned, others can pick up and integrate/extend this into the main branch of code.

Fair warning- This is not what I do. I only hack around at it when I need to. So take it all with a grain of salt. It might not work, and it is almost definitely ugly.
Also, this is my best recollection but may have gaps.

First thing I did was rename the types. I had four origins in mind.. Link (L), Thumbnail (T), Resize (R), and Full (F). Destinations were View (V), Resize (R), and Full (F). So L2R was Link to Resize for example. I went through in the beginning and found which types existed, then went through and renamed all the variables, etc.

The code by the way, is messy as I attacked this iteratively without a lot of cleaning up along the way. Certain types are more complete than others as far as alt, width, target, class, etc.

I also at one point thought I would only need the Full origins since I could use width to resize. Silly me not realizing how much larger Full images were sometimes vs. the Resize. Of course, if you're image is smaller than your Resize dimensions, there is no resize in Gallery, so you must you use the full. Etc. Live and learn.

/geturls/templates/blocks/blocks.inc
no changes

/geturls/templates/blocks/GetUrls.tpl
no changes

/geturls/templates/GetUrlsSiteAdmin.tpl
To my best recollection this is the FormattedURLs page in the Site Admin section of Gallery. The actual frame where the user can select which types to show or not. Etc. This is JUST the view layer. No logic or controls or validation or anything. Added checkboxes for my new types.

/geturls/templates/GetUrls.tpl
I believe this is the code for the FormattedURLs block. Around line 62 is a section performing validation and passing the validation state on using variables. Mostly checking that if you want a link to something it exists, or passing you an alternate (resize vs. full), etc. You will note that the bits I added are much simpler and simply pass True along. This is an area that needs work. Line 145 begins the meat of the URL logic. Make sure to all types appear as part of the IF statement on line 145 or nothing will happen. Here I suggest you learn/steal by example in my code (attached below). The original 0.9.3 code gave me just the right set of examples such that I could break down which code referenced the thumb vs. resize vs. full, etc. The ones down near the end are the most complete with alt, width, target, and class tags. Some of these can't be left blank, so you will need to modify code here if you don't want your links created this way.

/geturls/module.inc
no changes. Line 90 has types but I did not do anything here. Good to fix for completeness I guess.

/geturls/GetUrlsSiteAdmin.inc
This is the logic file behind the admin view. There's a foreach array on line 60 where you have to put your type variables. I believe that if you fail to do that your checkmarks in the site admin section won't get saved (consequent your URL links will never get displayed). Same with array beginning line 126.

/geturls/GetUrls.inc
no changes

/geturls/Callbacks.inc
no changes

/geturls/classes/GetUrlsHelper.class
Beginning line 71 there's a foreach array with just the original types listed. I believe this is just initializing each variable=0. I skipped it and have seen no ill effects, though this should probably be worked on for completeness.

Actually, on second thought, I'm going to try to attach my files.

You can see it in action at my friends' website, though at the moment we really only use two types: Resize to View and Fullsize to View, both with alt, width (controlling display in the browser), target to _blank, and an empty class tag used for layout.

Hope this helps. Did I forget anything? Take a type name and search through the files (or grep or whatever). You can probably find something I forgot, but this should get everyone started.

Unless my life changes radically, there's no way I will have time to work on this further. I'll keep an eye on this thread tho...

-akira

You can see this in action if you desire at my friends' website
www.casualultimate.com

 
pisolo

Joined: 2006-11-14
Posts: 7
Posted: Tue, 2006-11-21 01:28

Hi I've just downloaded and installed Gallery 2.1.2. I'd really need the geturls module, but there's no way to get working any of the various releases I've found available for download. I've also tried to modify the module according to what's written in the various forum posts but without success.
There's anybody out there who can post a "ready made" (and working) versions of geturls for the 2.1.2 (Core API=6.8 and Module API 2.0)?
Thanks in advance for your time and help
Ciao
Fabio

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-11-21 02:37

Fabio: You can find my first post earlier in the thread, but in short, I'm using Gallery 2.1.2 and got the software (basic functionality) to work...

Get the 1/14/06 release from this thread (0.9.3).

Grab the Coquevas GetUrls.tpl from in this thread, Posted: Tue, 2006-03-14 12:51.

Now if you need all sorts of extensions or such... that's a whole other matter.

 
pisolo

Joined: 2006-11-14
Posts: 7
Posted: Tue, 2006-11-21 15:02

Thanks for your reply ayamaguc. I've used the MODIFIED version of the two found in the zip attached to your post and replaced the tpl with the one you suggested.

At first I get in the modules sections:
Incompatible module!
Required Core API: 7.0 (available: 6.8)
Required Module: 3.0 (disponibile: 2.0)

Then I've modified the lines:

$this->setRequiredCoreApi(array(6, 8));
$this->setRequiredModuleApi(array(2, 0));

according to my Gallery 2 installation parameters in module.inc and following some other directions I've found in this thread.
The installations seems to succeed, but when I go to activate it I get the following:

Fatal error: Call to a member function on a non-object in /web/htdocs/www.mysite.com/gallery2/modules/core/SiteAdmin.inc on line 89

I cannot get in back the admin section until I phisically remove the geturl dir from the modules section. I'm not familiar with PHP at all so I'm stuck and I don't know what to do.
Any other clue?
Tks a lot
Fabio

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-11-21 18:37

Let's try this again..

I suggest one of two course-

1. Basic functionality- Safest way, is to go to post #1 in this thread and grab 0.9.3. Unpack that. Then replace GetUrls.tpl with the one from Coquevas' post.

2. More advanced functionality- Grab the attachment from my last post (just as you did) and use the MODIFIED folder. DON'T replace GetUrls.tpl with the one from Coquevas' post. I already did that before making changes.

3. Don't know- Try the 0.9.4 version that another contributor posted.

I can't say which is the best course for you b/c I don't know what linking functionality you need.

I am using this with Gallery 2.1.2 (minimal I think), Wordpress 2.0.5..

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Thu, 2006-11-23 04:36

First this is a great mod. Thanks for making it. I hope I am asking this in the right place. If not sorry.

With this mod you can post a thumbnail in a forum and once the thumbnail is clicked on you are taken back to the gallery. I am wondering how you could edit the code to have it so that when you click on the thumbnail that you are taken to a blank white page with just the full version of the image on it. Is this possible?

Thanks to anyone that can help.

Chris

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Sat, 2006-11-25 03:46

Anyone have an idea on my question?

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Sat, 2006-11-25 19:52

You should read this thread through. Or at least, from my first post in this thread to the end...

You will understand what's going on, and be able to make use of the file I posted.

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Tue, 2006-12-12 09:42

I tried the file you posted. It says it is incompatible with the gallery. All I am wanting to do is edit the code so the thumbnails link to the full view image. When someone clicks on my thumbnail image they wont go to my gallery but to the full view image instead. Anymore suggestions or ideas?

Thanks

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-12-12 18:19

Hmm. Ok. Then you should drop in a version of geturls that works with your installation and modify the code as you are thinking.

On 11/18 in this thread I detailed the changes I could recall making.

You should go through the code in my file and understand what's going on. Specifically you'll be looking for HtmlT2F (thumbnail to full). The GetUrls.tpl code is like this

{if $showHtmlT2F}
<p class="gbDescription">
{g->text text="HTML Thumbnail to Full:"}
<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.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}&
quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrl
sData.thumbId`" forceFullUrl=true}&quot; alt=&quot;{$theme.item.title|escape}&quot; class=&quot;&quot; /&gt;&lt;
/a&gt;">
<a onclick="javascript:clipboardData.setData('Text','&lt;a href=&quot;{g->url arg1="view=core.DownloadItem"
arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true htmlEntities=false}&quot; target=&quot;_blank&quot;&gt;&lt
;img src=&quot;{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.thumbId`" forceFullUrl=true}&quo
t; alt=&quot;{$theme.item.title|escape}&quot; class=&quot;&quot; /&gt;&lt;/a&gt;');window.status = '[T2F]{$GetUr
lsData.thumbId}[/T2F] copied to your clipboard for forum posting!';" href>[T2F]</a>
</p>
{/if}

Good luck...

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Tue, 2006-12-12 20:05

Thanks for that info. I will play around and see what I can do. Thanks again.

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Wed, 2006-12-13 03:18

OK I got it working. I used your file and did some editing and it works just fine. I can now post thumbnails in forums and once clicked on they go to the full version of the image on a page all to itself. They don't go back to the gallery. Thanks for the file.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Wed, 2006-12-13 17:00

Glad it work it. Hopefully, someone, someday will have time to go through the couple-few modified versions circulating here to combine them into a master with all of the requested bells, whistles, and widgets.

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Thu, 2006-12-14 05:29

yeah that would be nice. My next challenge is to make it so the thumbnails have a frame around them when posted on other forums. Kinda like the imageshack thumbnails.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 18:33

Is there a way I can manually add to the code to give an "embed" code for users to use?

I want to offer this as well for users who wish to use images in myspace.

Thanks a bunch..

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Tue, 2006-12-19 18:46

Why can't you just use the direct link code?

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 18:50
Quote:
Why can't you just use the direct link code?

I get 4 options
HTML Formatted
Clickable, which when used shows a "Click for image" link.

Clickable Thumbnail which shows three clickable dots...
Then I have the BBC code which is not what I really need.

Am I missing something?

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Tue, 2006-12-19 18:57

Did you go into your admin panel and then scroll down to Display and then click on formatted URLS. Make sure you have all them turned on for use.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 19:08

[img]http://i13.tinypic.com/43r67td.jpg[/img]

I do have them all checked and these are the only options I have.

The HTML codes either gives me "click for image" or the dots... which are clickable.

Weird

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Tue, 2006-12-19 19:27
ayamaguc wrote:
Shortly after posting last, I dug around in the code and managed to modify it create new/multiple types so that I could link FROM whatever I felt like TO whatever I felt like with appropriate control. I've been getting updates here and there but life has been crushing me so no time to respond until now.

Here in this post I'll try to elucidate the steps I took with code excepts and so on. I prefer this approach to just zipping up my files and posting them here. I built off of the 2006/01/14 and added the Coquesvas file, all for use with Gallery 2.1.2. Hopefully by sharing the how of what I learned, others can pick up and integrate/extend this into the main branch of code.

Fair warning- This is not what I do. I only hack around at it when I need to. So take it all with a grain of salt. It might not work, and it is almost definitely ugly.
Also, this is my best recollection but may have gaps.

First thing I did was rename the types. I had four origins in mind.. Link (L), Thumbnail (T), Resize (R), and Full (F). Destinations were View (V), Resize (R), and Full (F). So L2R was Link to Resize for example. I went through in the beginning and found which types existed, then went through and renamed all the variables, etc.

The code by the way, is messy as I attacked this iteratively without a lot of cleaning up along the way. Certain types are more complete than others as far as alt, width, target, class, etc.

I also at one point thought I would only need the Full origins since I could use width to resize. Silly me not realizing how much larger Full images were sometimes vs. the Resize. Of course, if you're image is smaller than your Resize dimensions, there is no resize in Gallery, so you must you use the full. Etc. Live and learn.

/geturls/templates/blocks/blocks.inc
no changes

/geturls/templates/blocks/GetUrls.tpl
no changes

/geturls/templates/GetUrlsSiteAdmin.tpl
To my best recollection this is the FormattedURLs page in the Site Admin section of Gallery. The actual frame where the user can select which types to show or not. Etc. This is JUST the view layer. No logic or controls or validation or anything. Added checkboxes for my new types.

/geturls/templates/GetUrls.tpl
I believe this is the code for the FormattedURLs block. Around line 62 is a section performing validation and passing the validation state on using variables. Mostly checking that if you want a link to something it exists, or passing you an alternate (resize vs. full), etc. You will note that the bits I added are much simpler and simply pass True along. This is an area that needs work. Line 145 begins the meat of the URL logic. Make sure to all types appear as part of the IF statement on line 145 or nothing will happen. Here I suggest you learn/steal by example in my code (attached below). The original 0.9.3 code gave me just the right set of examples such that I could break down which code referenced the thumb vs. resize vs. full, etc. The ones down near the end are the most complete with alt, width, target, and class tags. Some of these can't be left blank, so you will need to modify code here if you don't want your links created this way.

/geturls/module.inc
no changes. Line 90 has types but I did not do anything here. Good to fix for completeness I guess.

/geturls/GetUrlsSiteAdmin.inc
This is the logic file behind the admin view. There's a foreach array on line 60 where you have to put your type variables. I believe that if you fail to do that your checkmarks in the site admin section won't get saved (consequent your URL links will never get displayed). Same with array beginning line 126.

/geturls/GetUrls.inc
no changes

/geturls/Callbacks.inc
no changes

/geturls/classes/GetUrlsHelper.class
Beginning line 71 there's a foreach array with just the original types listed. I believe this is just initializing each variable=0. I skipped it and have seen no ill effects, though this should probably be worked on for completeness.

Actually, on second thought, I'm going to try to attach my files.

You can see it in action at my friends' website, though at the moment we really only use two types: Resize to View and Fullsize to View, both with alt, width (controlling display in the browser), target to _blank, and an empty class tag used for layout.

Hope this helps. Did I forget anything? Take a type name and search through the files (or grep or whatever). You can probably find something I forgot, but this should get everyone started.

Unless my life changes radically, there's no way I will have time to work on this further. I'll keep an eye on this thread tho...

-akira

You can see this in action if you desire at my friends' website
www.casualultimate.com

Find this post above. It has an updated file that will give you more options.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 20:17

LOL, ok, Updated with the modified version...

I have TONs of options but no direct link available.

Even the thumbnail links are not working..well they are, but they are not showing any thumbnails. Am I forgetting a step somewhere along the line?

FYI, thank you for your help.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-12-19 20:41
tink0509 wrote:
LOL, ok, Updated with the modified version...

I have TONs of options but no direct link available.

Even the thumbnail links are not working..well they are, but they are not showing any thumbnails. Am I forgetting a step somewhere along the line?

FYI, thank you for your help.

If you're using my file, then what I think you want are
HTML Inline Thumbnail Image
HTML Inline Resized Image / Width Tag
HTML Inline Full Image / Width Tag

You need to go into Site Admin, select Formatted URLs from the menu (it's turned on, right?) and check those options. Then grab the URLs from the Gallery.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 22:04
ayamaguc wrote:
tink0509 wrote:
LOL, ok, Updated with the modified version...

I have TONs of options but no direct link available.

Even the thumbnail links are not working..well they are, but they are not showing any thumbnails. Am I forgetting a step somewhere along the line?

FYI, thank you for your help.

If you're using my file, then what I think you want are
HTML Inline Thumbnail Image
HTML Inline Resized Image / Width Tag
HTML Inline Full Image / Width Tag

You need to go into Site Admin, select Formatted URLs from the menu (it's turned on, right?) and check those options. Then grab the URLs from the Gallery.

I am.

When I use those options as with the others, the only thing Im getting is two dots ... that are not clickable. It's like it's not grabbing the location or something...

Here are the three codes

HTML Inline Thumbnail Image:
<img src="http://www.xxxxx.com/php/html/modules/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=66&g2_GALLERYSID=b5ab1bbfa079a6ef1e4b5aaf7e32f640" alt="Smilie crying while laughing" class="" />

------------------------------------------------------

HTML Inline Resize Image / Width Tag:
<img src="http://www.xxxxx.com/php/html/modules/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=&g2_GALLERYSID=b5ab1bbfa079a6ef1e4b5aaf7e32f640" alt="Smilie crying while laughing" width="" class="" />

------------------------------------------------------

HTML Inline Full Image / Width Tag:
<img src="http://www.xxxxx.com/php/html/modules/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=65&g2_GALLERYSID=b5ab1bbfa079a6ef1e4b5aaf7e32f640" alt="Smilie crying while laughing" width="" class="" />

Does the code seem right?

Making sure its known, I want to use these images on myspace preferably.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-12-19 22:08

Things that come to mind:
1. Myspace is blocking the image. Unlikely. But you could try posting to somewhere else to test. Hell, I'll do it here. Maybe it'll work.
<img src="http://www.xxxxx.com/php/html/modules/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=66&g2_GALLERYSID=b5ab1bbfa079a6ef1e4b5aaf7e32f640" alt="Smilie crying while laughing"/>

2. Class tag is mandatory. If you have it with nothing in it, you are screwed. Highly likely as a problem. Take it out. Or put something in (I've defined my own sites' stylesheets as alignleft, alignright, or center). Or go into the code and remove that part of the tag generation.

3. Your web host does not allow / has turned off remote serving of images (there's a term for this-- i don't remember it right this second). Basically it prevents people from hijacking your bandwidth to serve your pictures as their content. This is usually a webserver setting.

There was something else but I've forgotten it. Darn.

?

Remembered it--
4. I've only other dealt with this with permalinks and such turned on. So my links are more like host.com/gallery/v/bobspicture.jpg or something. No idea if this is an issue.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 22:20
ayamaguc wrote:
Things that come to mind:
1. Myspace is blocking the image. Unlikely. But you could try posting to somewhere else to test. Hell, I'll do it here. Maybe it'll work.
<img src="http://www.xxxxx.com/php/html/modules/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=66&g2_GALLERYSID=b5ab1bbfa079a6ef1e4b5aaf7e32f640" alt="Smilie crying while laughing"/>

2. Class tag is mandatory. If you have it with nothing in it, you are screwed. Highly likely as a problem. Take it out. Or put something in (I've defined my own sites' stylesheets as alignleft, alignright, or center). Or go into the code and remove that part of the tag generation.

3. Your web host does not allow / has turned off remote serving of images (there's a term for this-- i don't remember it right this second). Basically it prevents people from hijacking your bandwidth to serve your pictures as their content. This is usually a webserver setting.

There was something else but I've forgotten it. Darn.

?

Remembered it--
4. I've only other dealt with this with permalinks and such turned on. So my links are more like host.com/gallery/v/bobspicture.jpg or something. No idea if this is an issue.

1. I think I know the problem. As myspace only accepts (I think) actual file names with extensions , jpg, gif, etc...this is a problem. I am trying to activate URL REwrite and having a hell of a time getting it to work. I posted a help question in the other forum about it.

2. Not sure this is the problem, but I will consider it.

3. Nah its not the host as Ive linked from images before

4. I think this is the URL Rewrite part in Gallery2. Now just need to get it working...

Once I get it working, will the get url feature give me the url with the extension?

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Tue, 2006-12-19 22:31

I just turned on this feature for this mod(Using the updated file from ayamaguc). "HTML Inline Full Image / Width Tag " I then went and copied the url it gave me for the image and it posted it just fine in myspace. Not problems what so ever.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 22:31
mac27 wrote:
I just turned on this feature for this mod(Using the updated file from ayamaguc). "HTML Inline Full Image / Width Tag " I then went and copied the url it gave me for the image and it posted it just fine in myspace. Not problems what so ever.

Hmm, then I wonder why I only get dots instead of the image? Weird

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 22:36

Here is the link I get with

HTML Inline Full Image / Width Tag
<img src="http://www.hellonturf.com/php/html/modules/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=65&g2_GALLERYSID=b5ab1bbfa079a6ef1e4b5aaf7e32f640" alt="Smilie crying while laughing" width="" class="" />

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-12-19 22:38

Dump the class tag. That's my best guess. I recall having issues where having class="" lead to no image. A user education thing I had to get around.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 22:42
ayamaguc wrote:
Dump the class tag. That's my best guess. I recall having issues where having class="" lead to no image. A user education thing I had to get around.

There must be some other issue Im having because I dumped it and still get dots instead of a image.

The dots are not even clickable.

Do I need anything else installed? I wouldnt think?

Verified I am using 0.9.3 version.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Tue, 2006-12-19 22:55

If Myspace restricts file extensions, then you need to get clean URLS.

My links look like this
Resized
<img src="http://www.casualultimate.com/gallery2/d/551-3/briefcase+hats+in+huddle.jpg" alt="briefcase hats in huddle" width="" class="" />
Full
<img src="http://www.casualultimate.com/gallery2/d/549-2/briefcase+hats+in+huddle.jpg" alt="briefcase hats in huddle" width="" class="" />

The user then has to adjust the width and layout for presentation.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Tue, 2006-12-19 23:03

I think thats what the problem is.

In order to get them I need to enable URL Rewrite which Im having a heck of a time doing.

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Wed, 2006-12-20 02:22

yep that is weird. I don't use URL rewrite and I leave the class="" in the image URL to. The problem is the link it is giving you. Did you edit the code in anyway?

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Wed, 2006-12-20 02:28
mac27 wrote:
yep that is weird. I don't use URL rewrite and I leave the class="" in the image URL to. The problem is the link it is giving you. Did you edit the code in anyway?

Code is untouched, I wouldnt know what to edit, lol..

I even reinstalled it and still nada

Your on Phpnuke 8.0?

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Wed, 2006-12-20 02:28

you might try my copy of the get urls. I don't know if it will help or fix it. It is just an edited version of ayamaguc file. This is the GetURLS.tpl file only. Make sure you back up your current copy of the file before overriding it with this one.

 
mac27

Joined: 2006-11-23
Posts: 13
Posted: Wed, 2006-12-20 02:29

no I don't use PHPNuke. That could cause it but I can't say for sure. Hopefully the zip file above will help.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Wed, 2006-12-20 02:41
mac27 wrote:
no I don't use PHPNuke. That could cause it but I can't say for sure. Hopefully the zip file above will help.

Nah it didn't.

Thanks for trying though. Guess Im stuck for now..

Just for FYI in case anyone could help

Using PHPNuke 8.0 embedded Gallery 2.1.2 using GetURLS Modified 2.1.0

Not sure if that would help or not, lol

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Wed, 2006-12-27 17:02

Back again, lol

Quick question. How can I change the format of the url in the template?

I want the image to link back to the main site and not link back to the image itself.

Here is the URL

<a href="http://www.xxxxxx.com/nuke/modules/gallery2/d/25-1/thnkful.gif" target="_blank">
<img src="http://www.xxxxxxxx.com/nuke/modules/gallery2/d/25-1/thnkful.gif" alt="" width="" class="" /></a>

Instead, I want when the image is clicked on, it takes you to the main site and not the image.
I couldnt figure out what to eliminate from the template.

Thanks a million.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Wed, 2006-12-27 18:35
tink0509 wrote:
Back again, lol
Instead, I want when the image is clicked on, it takes you to the main site and not the image.
I couldnt figure out what to eliminate from the template.
Thanks a million.

Could you clarify-- what do you mean by the 'main site'? Your home page? Gallery main? The view page for that album image?

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Wed, 2006-12-27 18:51
ayamaguc wrote:
tink0509 wrote:
Back again, lol
Instead, I want when the image is clicked on, it takes you to the main site and not the image.
I couldnt figure out what to eliminate from the template.
Thanks a million.

Could you clarify-- what do you mean by the 'main site'? Your home page? Gallery main? The view page for that album image?

Yes my home page. Sorry.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Wed, 2006-12-27 19:05
tink0509 wrote:
<a href="http://www.xxxxxx.com/nuke/modules/gallery2/d/25-1/thnkful.gif" target="_blank">

The generation of your link needs to be changed so that this part is hardcoded to your site url. That means you gotta go dig around in the files for where this is generated and take out all of the php that forms the link and instead have it spit out http://www.yoursite.com/ or whatnot. Up to you if you want to keep the target or not.

It's not hard. You just gotta go in the files and find the right link type you're using and edit it (or create a new one).

I don't have any time to dig around or do it for you. Good luck...

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Wed, 2006-12-27 22:23

I see where it is generated in the GetURL.tpl file

I don't know what to edit or take out to generate it. When I thought I had it, it wasn't it and messed up the other codes.

I just need to know what to edit/take out/replace.

 
ayamaguc

Joined: 2006-10-02
Posts: 21
Posted: Wed, 2006-12-27 23:11

Pls post code. I'll try to comment.

 
tink0509

Joined: 2006-12-18
Posts: 33
Posted: Wed, 2006-12-27 23:16

{if $showHtmlF2F}
<p class="gbDescription">
{g->text text="HTML Full to Full / 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.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}" alt="{$theme.item.title|escape}" width="" class="" /></a>">
<a onclick="javascript:clipboardData.setData('Text','&lt;a href=&quot;{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true htmlEntities=false}&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;{g->url arg1="view=core.DownloadItem" arg2="itemId=`$GetUrlsData.itemId`" forceFullUrl=true}" alt="{$theme.item.title|escape}" width="" class="" /></a>');window.status = '[F2F]{$GetUrlsData.itemId}[/F2F] copied to your clipboard for forum posting!';" href>[F2F]</a>
</p>
{/if}

I'm guessing this is the only code that I need to change if this is the only one I want to change.