Topic title appears after IMG tags.

Started by kat, April 28, 2009, 07:43:38 PM

Previous topic - Next topic


Odd, that.

Just set up a new forum for a friend.


Image Quote Removal
User Control Panel
British English Spelling Of Centre & Colour BBCode

Here's a link to a post, showing it.

Happens with all themes.


"The topic or board you are looking for appears to be either missing or off limits to you."
Always be a little kinder than necessary.
- James M. Barrie


I'm gonna take a wild guess and say that the highslide mod is causing it:
<div class="highslide-heading">Checking image tag weirdy.</div>

Line 181  of the install.xml modifies Display.template.php:
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" class="highslide" rel="highslide"><img src="', $attachment['thumbnail']['href'], '" alt="' , $attachment['name'] , '" id="thumb_', $attachment['id'], '" border="0" /></a><br /><div class="highslide-heading">' , $message['subject'] , '</div>
Always be a little kinder than necessary.
- James M. Barrie


Curious. I have that mod on my site and everything's kushty.

I'm guessing it's something in "sources", as it's affecting all themes.

I know custom themes use files from the default, but XBox and Helios have quite a few files replaced, soooooo.....


Helios MC doesn't have a Display.template.php but XBoxElite does. When I view the topic, I appear to be on something like apollo11...does that have its own Display.template file?
Always be a little kinder than necessary.
- James M. Barrie


You were right about the Sources/Subs.php thing:
$b[1] = str_replace($b[2], $b[2].'" class="highslide" rel="highslide', $b[1]);
$b[5] = str_replace($c, $b[1], $b[5]);
$b[5] = str_replace('alt=""', 'alt="' . $b[2] . '"', $b[5]); // Add filename to caption
$b[5] = $b[5] . '<div class="highslide-heading">' . (!empty($context['subject']) ? $context['subject'] : '') . '</div>'; // Add subject to header

Although I haven't a clue what that's exactly doing, but it kinda reflects what I'm seeing on that page.
Always be a little kinder than necessary.
- James M. Barrie


That's a damned good call!

Looks, to me, like:

$b[5] = str_replace('alt=""', 'alt="' . $b[2] . '"', $b[5]); // Add filename to caption

could be the problem. As I don't really care if the filename's there, I'll try removing that, tomorrow.

It's 2am, here, so I'm off for some sleep.

Thanks for your work, Mashby. MUCH appreiated!

I'll report back, tomorrow, to let you know how it goes.


Now that's odd.

If I remove that line, it seems to have no effect.

Not just with the thread-title appearing, but it doesn't seem to affect the Highslide mod, either!

I'm curious about this section:

        // Http links don't use highslide
        if(preg_match('~\.(png|gif|jp(e)?g|bmp)~is', $b[2]))


Well, just to check, I removed the entire block of code from subs.php and the text vanished. Naturally, HighSlide stopped functioning. ;)

Just got to try and figure-out which bit's causing the hassle, now.


Just for fun...maybe:
Find this:
$b[5] = $b[5] . '<div class="highslide-heading">' . (!empty($context['subject']) ? $context['subject'] : '') . '</div>'; // Add subject to header

Replace with this:
// Add subject to header
Always be a little kinder than necessary.
- James M. Barrie


Well, that WAS phun!

It seems to have done the trick!

Thanks, man!

Just for the old "Learning-curve", what was the problem?


Well, I'm not entirely verse on what Highslide does exactly. Maybe it was content that was supposed to be magical or something, but I'm not confident on that. I'd even bet to say that it may just be how the thing was designed...put the Subject line under the image, but that just doesn't seem logical. At least it's sorted out...I see the mod author hasn't chimed in. But I did just view this post:

And I noticed that the bar above the image contains "Highslide Viewer" which just happens to be the Subject content. I also noticed that the topic above works like a charm, but it's not really working on yours (the magic highslide part).
Always be a little kinder than necessary.
- James M. Barrie


Highslide makes it so that clicking on an attached pic enlarges it.

The image in that post was just an image posted with IMG tags. Highslide wouldn't affect those, just attached ones.

Oddly enough, the mod not only still works, but the image title still appears underneath them, as it seems it should.

Ha! All's well that ends well, ay?

Cheers, dooooooooood!


Hmm...the theme I see your thread on doesn't seem to be doing the cool flyout of the image. There's not a highslide.js nor a highslide.css called in the index.template.php file is my guess. I bet if you called them up (and maybe even put back that snippet of div code), it would work like a charm.
Always be a little kinder than necessary.
- James M. Barrie


No, that image is in IMG tags. Hang on, I'll attach one, so you can see what it does...

Keep clicking the image...


I just did the old ?theme=1 on that site, viewed that thread and it's working for sure. On the apollo theme, it's not operating. Need some magic added to the <head>:
<script language="JavaScript" type="text/javascript" src=""></script>
<link rel="stylesheet" type="text/css" href="" media="screen" />
<script type="text/javascript">
    hs.graphicsDir = "";
    hs.outlineType = "rounded-white";
    hs.captionEval = "this.thumb.alt";
    hs.transitions = ["expand", "crossfade"];
    hs.align = "center";
    hs.creditsText = "";
    hs.creditsHref = "";
    hs.creditsTitle = "";
    if (hs.addSlideshow) hs.addSlideshow({
        interval: 5000,
        repeat: false,
        useControls: true,
fixedControls: false,
        overlayOptions: {
        opacity: 1,
        position: "top right",
        hideOnMouseOut: false

And looking at that part, I'd even suggest putting that <div> code back in the subs.php file, too.
Always be a little kinder than necessary.
- James M. Barrie


Now that's odd, coz it's working for me, with Apollo, but only using Opera....  ???

I'll try that code and report back.

Ta, mate.



Works OK with Opera. K-Meleon can see the image, but it doesn't enlarge.

Firefox can't even see the image, nor can IE.

Weirder and weirder.