Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Linking pics directly (hyperlink)
dummy
#1 Posted : Tuesday, 17 June 2008 6:25:11 AM(UTC)
Rank: Member

Joined: 15/03/2008(UTC)
Posts: 8

Roger,

what page is the hyperlink retreived from? I am looking to add a direct link to a photo instead of a link to the page so that users can link their pics to say BB boards.

Right now the HyperLink shows this:
http://www.realphotoalbum.com/default.aspx?moid=2

I am looking to show (along with this info, so I will just drop it underneath):
http://realphotoalbum.co...Gallery/20086804772.jpg

Any help would be greatly appreciated - I don't see this as an option currently nor on the roadmap.....though I may have missed it :)
Roger Martin
#2 Posted : Tuesday, 17 June 2008 6:44:05 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I don't think you can modify the Permalink URL without editing the source code, but you can modify the HTML template so that the URL is displayed just below the image. Open config/galleryserverpro.config and look for this:

Code:
<mediaObject mimeType="image/*">
<browsers>
<browser id="default" htmlOutput="&lt;div class=&quot;op1&quot;&gt;&lt;div class=&quot;op2&quot;&gt;&lt;div class=&quot;sb&quot;&gt;&lt;div class=&quot;ib&quot;&gt;&lt;img id=&quot;mo_img&quot; src=&quot;{MediaObjectUrl}&quot; class=&quot;{CssClass}&quot; alt=&quot;{TitleNoHtml}&quot; title=&quot;{TitleNoHtml}&quot; style=&quot;height:{Height}px;width:{Width}px;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;" />
</browsers>
</mediaObject>


Add the desired HTML snippet to the end of the htmlOutput attribute so that it looks like this:

Code:
<mediaObject mimeType="image/*">
<browsers>
<browser id="default" htmlOutput="&lt;div class=&quot;op1&quot;&gt;&lt;div class=&quot;op2&quot;&gt;&lt;div class=&quot;sb&quot;&gt;&lt;div class=&quot;ib&quot;&gt;&lt;img id=&quot;mo_img&quot; src=&quot;{MediaObjectUrl}&quot; class=&quot;{CssClass}&quot; alt=&quot;{TitleNoHtml}&quot; title=&quot;{TitleNoHtml}&quot; style=&quot;height:{Height}px;width:{Width}px;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;URL: http://www.mysite.com{MediaObjectAbsoluteUrlNoHandler}&lt;/p&gt;" />
</browsers>
</mediaObject>


Note: Change "http://www.mysite.com" to your domain.

The secret is using the replacement parameter {MediaObjectAbsoluteUrlNoHandler}. You can read more about using them in the Admin Guide, in the section Rendering Media Objects to the Browser.

By default the URL will point to the compressed version rather than the original. You'll have to click to view the original to get that URL. And remember there is an option for viewing the hi-res originals by default if desired.

You are obviously not restricted to the change I suggested. The beauty of the HTML template system is that you can configure it however you want.

Roger Martin
Creator and Lead Developer of Gallery Server Pro
TekWarren
#3 Posted : Wednesday, 28 October 2009 2:56:06 AM(UTC)
Rank: Member

Joined: 28/10/2009(UTC)
Posts: 11
Location: Michigan

New user of GSP and reviving this old topic. Is the method described here still correct? I would like to have a link or button that provides the exact url to any given image...movie files would be great also...so they can be shared on other sites such as forums.

I am not a coder but I can follow directions :) I was not able to find the exact block of code you specified here to alter.

Thanks...loving this product so far and will most definitely be supporting it.
Roger Martin
#4 Posted : Wednesday, 28 October 2009 11:07:07 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Yes, this is the right way to do it. You'll find galleryserverpro.config at ~gs\config in the web application.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Roger Martin
#5 Posted : Friday, 6 November 2009 8:59:23 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I should note that the HTML template for images has changed a bit since the original solution was posted. As of 2.3.3512, the template will look like this once you add the hyperlink:

Code:
<mediaObject mimeType="image/*">
<browsers>
<browser id="default" htmlOutput="&lt;div class=&quot;gsp_floatcontainer&quot;&gt;&lt;div class=&quot;op1&quot;&gt;&lt;div class=&quot;op2&quot;&gt;&lt;div class=&quot;sb&quot;&gt;&lt;div class=&quot;ib&quot;&gt;&lt;img id=&quot;mo_img&quot; src=&quot;{MediaObjectUrl}&quot; class=&quot;{CssClass}&quot; alt=&quot;{TitleNoHtml}&quot; title=&quot;{TitleNoHtml}&quot; style=&quot;height:{Height}px;width:{Width}px;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;URL: http://www.mysite.com{MediaObjectAbsoluteUrlNoHandler}&lt;/p&gt;&lt;/div&gt;" />
</browsers>
</mediaObject>

Roger Martin
Creator and Lead Developer of Gallery Server Pro
TekWarren
#6 Posted : Friday, 6 November 2009 11:34:28 AM(UTC)
Rank: Member

Joined: 28/10/2009(UTC)
Posts: 11
Location: Michigan

Thanks Roger! I will be making this change soon.
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.