little bug in plugin_medianinsert.tpl (imageselectorplus)

Found a bug? Tell us!!
Post Reply
narrenfrei
Regular
Posts: 29
Joined: Mon Jul 05, 2010 6:28 pm
Location: Langschlag (Austria)
Contact:

little bug in plugin_medianinsert.tpl (imageselectorplus)

Post by narrenfrei »

Is there a little bug in plugin_medianinsert.tpl from serendipity_event_imageselectorplus?

I had to delete the {$serendipityHTTPPath} in plugin_medianinsert.tpl, because otherwise I got as adresse for the images: <img width="460" height="355" src="//uploads/filename.JPG" />

My blog isn't running in a subfolder from my domain, so "in Relativer HTTP-Pfad" I have only entered a /.

The original code from plugin_medianinsert.tpl:

Code: Select all

<div class="serendipity_mediainsert_gallery">

{foreach from=$plugin_mediainsert_media item="medium"}
  <div class="serendipity_imageComment_left" style="width: {$medium.thumbwidth}px" >
      <div class="serendipity_imageComment_img">
      <a class="serendipity_image_link" href="/uploads/{$medium.path}{$medium.realname}">
        <!-- s9ymdb:795 -->
        <img width="{$medium.thumbwidth}" height="{$medium.thumbheight}"  src="{$serendipityHTTPPath}/uploads/{$medium.path}{$medium.name}.{$medium.thumbnail_name}.{$medium.extension}" />
      </a>
      </div>
      <div class="serendipity_imageComment_txt">{$medium.comment1}</div>
  </div>
{/foreach}

</div>
narrenfrei.at
"Die große Stärke der Narren ist es dass sie keine Angst haben, Dummheiten zu sagen." (Jean Cocteau)

Blog-Engine: Serendipity 1.6.2 (PHP 5.2.12-nmm4 @ all-inkl.com)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: little bug in plugin_medianinsert.tpl (imageselectorplus

Post by garvinhicking »

Hi!

Yeah, the reason is that the plugin simply adds another "/" in case users have entered "" as the httppath. Having "/" or "/////" only looks odd but should work nevertheless... ?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
narrenfrei
Regular
Posts: 29
Joined: Mon Jul 05, 2010 6:28 pm
Location: Langschlag (Austria)
Contact:

Re: little bug in plugin_medianinsert.tpl (imageselectorplus

Post by narrenfrei »

My httppath is "/" - When deleting the "/" I can't reach my blog and have to insert the "/" again, directly via phpMyAdmin into the database and also in the .htaccess.

But with the httppath set as / , I have to delete the {$serendipityHTTPPath} in the plugin_medianinsert.tpl - otherwise the images aren't shown because of the two // in the path.

I think the plugin_medianinsert.tpl should work without the {$serendipityHTTPPath} in a right way, because in line 6 (insert the link into the a-tag) the variable {$serendipityHTTPPath} also isn't used.
Or do I miss something?

Thanks for help,
Franz
narrenfrei.at
"Die große Stärke der Narren ist es dass sie keine Angst haben, Dummheiten zu sagen." (Jean Cocteau)

Blog-Engine: Serendipity 1.6.2 (PHP 5.2.12-nmm4 @ all-inkl.com)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: little bug in plugin_medianinsert.tpl (imageselectorplus

Post by garvinhicking »

Hi!

Ah, okay, a double slash at the start is sometimes interpreted as another resource URL. In your case you should use a .tpl file where you replace /uploads/ with "uploads/", then you can leave serendipityHTTPPath there.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply