× Ask your questions about the hacks we made available for download. Try to keep your questions in their specific category!

Question Similar tags to use intro image

11 Mar 2014 06:23 #341 by ltempest

  • Fresh Boarder
  • Fresh Boarder

  • Posts: 2
  • Thank you received:

  • Gender: Unknown
  • Birthdate: Unknown
  • HELP!
    I have the similar tags module running on my website. All is working fine apart form the image is not displayed.
    I think this is because the code looks for the first image within the article text, rather than the Joomla 3 Intro image that can be found under the Images and Links tab within a Joomla 3 article.
    How can I modify the code to use this Intro image?
    Thanks
    Lee

    Please Log in to join the conversation.

    11 Mar 2014 06:49 - 11 Mar 2014 06:49 #342 by webgobe

  • Administrator
  • Administrator

  • Posts: 150
  • Karma: 4
  • Thank you received: 8

  • Gender: Male
  • Birthdate: 18 Jan 1960
  • Lines 29-30 in tmpl/default.php:
    $text=$item->core_body;
    preg_match_all('/<img (.*?)>/', $item->core_body, $match);
    As you see, the module looks for the <img tag here. You should play with this.
    The original content is saved in the $text variable, then the first occurance of the <img tag is found, cut off, and the content for the module rebuilt used the found image data and the "cleaned" content (the content WITHOUTH the first occurance of "<img "tag).
    Last Edit: 11 Mar 2014 06:49 by webgobe. Reason: fixes

    Please Log in to join the conversation.

    11 Mar 2014 07:21 #343 by ltempest

  • Fresh Boarder
  • Fresh Boarder

  • Posts: 2
  • Thank you received:

  • Gender: Unknown
  • Birthdate: Unknown
  • Webgobe,
    Thanks for the reply, I did notice that code in the default,php file.
    However I think an additional db query needs adding to the helper file to extract the image data from the images field within the content table.
    Unfortunately I do not have enough PHP knowledge to know how to write or where to add the db query :-(
    Can you offer any advice?
    Thanks,
    Lee

    Please Log in to join the conversation.

    11 Mar 2014 07:36 #344 by webgobe

  • Administrator
  • Administrator

  • Posts: 150
  • Karma: 4
  • Thank you received: 8

  • Gender: Male
  • Birthdate: 18 Jan 1960
  • No, you don't need that, all data is there. Try to print out the content of $item array, for example this way:
    print_r($item);
    to see what info where is located in the array, then you can use it.

    Please Log in to join the conversation.

    19 Apr 2014 06:11 #346 by Qbik

  • Fresh Boarder
  • Fresh Boarder

  • Posts: 1
  • Thank you received:

  • Gender: Unknown
  • Birthdate: Unknown
  • What about intro image added by images and links it not showing at all,
    any solution for that??

    Please Log in to join the conversation.

    22 Apr 2014 03:47 #347 by webgobe

  • Administrator
  • Administrator

  • Posts: 150
  • Karma: 4
  • Thank you received: 8

  • Gender: Male
  • Birthdate: 18 Jan 1960
  • See above - the module seeks for the first image in the article text (and not the now available "intro image" in Joomla article settings) and display that. When I will have some time to play with the module, will extend it to handle these too, but right now you are on your own, I am overwhelmed with commercial jobs, don't know when will have time to add this to the code. But should be pretty simple, you need to extend a bit the IF - see the previous comments.

    Please Log in to join the conversation.

    Joomla Security

    Do you need a helping hand to keep your Joomla site in top shape?

    You need someone to keep your site safe? If you want to know, what we can do for you, here is a short list:

    • We are performing a security audit - and we repeating this regularly
    • We are appliying all upgrades to the site as needed
    • We are adding our mix of security tools, settings and patches
    • We are setting up a backup procedure to ensure, that your data is safe
    • We are monitoring for uptime and unwanted activity
    • We are correcting any issues found
    • We are supporting all current and upcoming Joomla versions

    Sit back and relax - we are doing the mundane work for you!

    You only need to get your portion of Joomla Security Update today!

     

    Forum Search

    Keyword

    Recommendations

    I highly recommend Denes for any Joomla related work. He has deep expertise, does what he says he'll do, and shows you how to do if he feels it will save you money. He's the only Joomla technical resource I plan on using in the future!

    Ernie Johnson
    Senior Solutions Manager at MoneyGram International
    January 13, 2012

    Forum

    Forum Statistics

    • Total Users:13.85k
    • Latest Member:athanaso
    • Total Posts:326
    • Total Topics:74
    • Total Sections:2
    • Total Categories:14
    • Today Open:0
    • Yesterday Open:0
    • Today Answer:0
    • Yesterday Answer:0

    Disclaimer

    webGóbé and http://webgobe.com is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.

    All downloadable items in these pages are zip files containing no malware, adware or any other potentially dangerous content. They are meant to be used as extensions of Joomla CMS, and don't install or modify anything on your computer. Special install/uninstall info - if is different from standard Joomla extension install/uninstall procedure - is contained in each package - and available in the download page prior you click on the Download button.

    Expert SEO Services by Houts Graphics The professional company a4c provides all the information on development application for CashBack. The professional company a4c provides all the information on development whitelabel for CashBack.

    For additional local NJ Limousine Service New Jersey Limo Service visit nycairportslimo.

    Sign In or Create Account