test
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • arialblack14 Friend
    #181405

    Hello everyone.

    I am facing some kind of problem with the title of the images imported from feedgator.
    When i use Joomla native content plugin, titles (from some sites) display as follows :

    When i use the K2 content plugin, the title seems broken when i hover the cursor over the image like this :

    How could i remove the title or fix if possible, since the titles of images from other sites appear to be ok?
    FYI I am on localhost.
    Any suggestions?
    Thanks in advance….

    P.S.
    I could not find a relative thread…


    1. Screenshot01
    2. Screenshot02
    HeR0 Friend
    #470067

    Hi Ariablack,

    Because the title is processed by htmlspecialchars function before it is displayed. Hence, you should check k2 content plugins which might use htmlspecialchars to proceed the title.

    Regards,

    arialblack14 Friend
    #470459

    Thank you for your answer.
    It is not only the K2 content plugins, it is also the Joomla! native ones, as shown in picture.
    Just with K2 that happens when hovering mouse whilst with Joomla! ones displays title like that onto picture.
    This does not happen with all site feeds, but with feeds from specific sites, so i guess it’s something with the feed they provide. (Oh i have to include them)

    As i am no php expert could you please point me to the file i have to edit in order to get it working (or erase the title display whatsoever)……..?

    arucardx Friend
    #470461

    Ah… hmmm…. I’ve been thinking of trying to give this a shot at fixing, but I forgot about it. Let me just post this here so I’ll remember about it, while I go look at the code. Should just be a easy fix if you have no issues with removing the on hover caption.

    Edit: Oh wait. I forgot to ask. Do you need to fix this on K2 or Joomla? Both requires different fix.

    arialblack14 Friend
    #470462

    Thanks for looking into it!
    Waiting for your reply!

    arucardx Friend
    #470473

    edit sry, I mess up my post zzz. need to rewrite it.

    arucardx Friend
    #470476

    Sry for the wait, I was starring at the right code but misunderstood it for some reason lol. But here’s the fix for both Joomla and the K2. Could be wrong, could be right, I’m not sure since I have no Unicode article to test with.

    Joomla: Open html/com_content/category/blog_item.php and look for this block of code
    [PHP] <img
    <?php if ($images->image_intro_caption):
    echo ‘class=”caption”‘.’ title=”‘ .htmlspecialchars($images->image_intro_caption) .'”‘;
    endif; ?>
    src=”<?php echo htmlspecialchars($images->image_intro); ?>” alt=”<?php echo htmlspecialchars($images->image_intro_alt); ?>”/>[/PHP]

    Replace it with
    [PHP]<img src=”<?php echo htmlspecialchars($images->image_intro); ?>” />[/PHP]

    Actually wrote a rewrite code for this to display the unicode properly but after looking at your screenshot, it seems your article title and caption is the same so I doubt you need the caption effect. Might as well remove the caption.

    Now for K2, go to html/com_k2/ja_wall/category_item.php and look for this block of code.
    [PHP] <div class=”item-image”>
    <a class=”item-link” href=”<?php echo $this->item->link; ?>” title=”<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>”>
    <img src=”<?php echo $this->item->image; ?>” alt=”<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>” />
    <span> </span>
    </a>
    </div>[/PHP]

    Replace it with this
    [PHP] <div class=”item-image”>
    <a class=”item-link” href=”<?php echo $this->item->link; ?>” >
    <img src=”<?php echo $this->item->image; ?>” />
    <span> </span>
    </a>
    </div>[/PHP]

    Problem solved for K2 =) Doubt there’s any code error, didn’t test it but looks good to me.

    P.S: Sry edit twice, the Joomlart forum screw up my first post then I got sleepy and wrote the wrong code 2nd round >_< But now it’s fixed correct for sure.

    arialblack14 Friend
    #470592

    Thank you so much for all your time and effort arucardx!!
    The problem was fixed for joomla, but unfortunately not for K2.
    I understand your code but still struggling with php 😉

    arucardx Friend
    #470593

    What’s wrong with the code for K2? The code I gave you has it’s caption entirely stripped. If you can show me the problem, I can try to fix it for K2.

    arialblack14 Friend
    #470594

    It’s just like the 2nd screenshot i have posted.
    When hovering mouse over image of the article it displays wrong…:((

    arucardx Friend
    #470595

    It seems you are editing the wrong K2 file. Can you check if you are using JA Wall, JA Showcase or JA Blog then modify the category_item.php in the correct folder?

    arialblack14 Friend
    #470596

    Well, you were right about that…
    i am using JA Showcase, so went ahead and changed that block and no change again.
    Really appreciate your help.

    Edit:The display was removed entirely.
    Works for me!

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 12 replies, has 3 voices, and was last updated by  arialblack14 12 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum