PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   How Do I? - vBulletin 3.5.X (http://www.photopost.com/forum/how-do-i-vbulletin-3-5-x/)
-   -   hyperlinking a URL in vbGallery custom field (http://www.photopost.com/forum/how-do-i-vbulletin-3-5-x/124296-hyperlinking-url-vbgallery-custom-field.html)

rrr April 7th, 2006 03:10 AM

hyperlinking a URL in vbGallery custom field
 
I added a custom field to my vBA gallery that allows a user to give a hyperlink that goes along with the image they uploaded.

I used to have it hyperlinked in my old version of vbGallery, but when I just upgraded my vb to 3.5.4 and the current version of vbGallery I can't seem to get it hyperlinked.

Can you tell me how I can hyperlink that custom profile field?

KW802 April 7th, 2006 09:57 AM

rrr,

Good catch. I did the same thing on my site and didn't even realize that the 1.0.2 upgrade broke it. I remember talking with Brian about it so I searched the threads and came across this...

http://www.photopost.com/forum/how-do-i-vbulletin-3-0-x/117129-parsing-html-custom-fields.html

Try post #7 in that thread.

rrr April 7th, 2006 01:50 PM

Thanks Kevin. I think I remember you helping me with this last time :)

I tried the suggestion in that thread and it didn't seem to work.

I tried:

Code:

Content visible to verified customers only.
and

Code:

Content visible to verified customers only.
And neither seemed to hyperlink that the URL

KW802 April 7th, 2006 03:08 PM

I'll play around with it on my main site this weekend.

... or sooner if I get bored at work. :D

KW802 April 7th, 2006 03:24 PM

rrr,

OK, looks like sometime after that other thread's conversation it was indeed turned into a default option.

Go into the category and head down to the "Custom Fields" section... in there you'll see an option named "Automatically Parse Links In Text" and make sure it is turned on.

The 'gotcha' is that the flag works when images are uploaded or edited but not when they are displayed. That means if you have any existing images with a link in the text that was uploaded before the flag was turned on then they won't be parsed unless the image is edited.

rrr April 7th, 2006 06:00 PM

Thanks!

Any idea how I could hyperlink an image on showimage.php to that custom field URL?

Would it just be a matter of editing showimage.php and calling the $customfield4 in an <a href tag? I can't seem to see where the image is called in showimage.php

I used to have a copyright notice that I added right under the image on the showimage.php page, but now I can't figure how how I added that text in there.

rrr April 7th, 2006 06:31 PM

I'm dumb. I realized that you make HTML changes in the template files, not the PHP files.

Still not sure how to call customfield 1 in the showimage template though.

rrr April 7th, 2006 06:50 PM

Ok, found this thread that shows how to call my customfield1 into the showimage template:
http://www.photopost.com/forum/showt...ht=customfield

Got it working.

Now the complicated part :)

When I call that $customfield in the template, I don't want THAT particular instance to be autolinked. I want it to just show as plain text so I can style the ink (by linking it to an image), like so:

<a href="$customfield"><img src="example.jpg"></a>

or
<a href="$customfield">$imagecode</a>

Is there a way to take the code in showimage.php

Code:

Content visible to verified customers only.
And turn OFF the convert_url_to_bbcode for $shoplink for that instance so it just echos the plain text of http://www.example.com

PhoenixDown21 April 7th, 2006 07:54 PM

Try doing it the default way and use the maintence tools to rebuild something like the mini pics

rrr April 7th, 2006 08:26 PM

What do you mean by "the default way"?

rrr April 11th, 2006 04:27 PM

Anyone?

PhoenixDown21 April 16th, 2006 11:44 PM

rrr,

Try KW's advice
Quote:

Go into the category and head down to the "Custom Fields" section... in there you'll see an option named "Automatically Parse Links In Text" and make sure it is turned on.

The 'gotcha' is that the flag works when images are uploaded or edited but not when they are displayed. That means if you have any existing images with a link in the text that was uploaded before the flag was turned on then they won't be parsed unless the image is edited.
Then try rebuilding pics to see if that update the existing photos so the hyperlink works properly.


All times are GMT -5. The time now is 04:29 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97