Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • mitov Friend
    #137420

    Hi There,

    The jacatslwi module takes the last picture from the article and displays it. However, i want to make it take the first picture in the article, as there are several in there… How can i do this?

    Any advice would be great.

    Thanks in advance!

    ——————————–

    Also, how can i define what text to display on the front page? At the moment, it’s not displaying the forst sentance, but a random sentance from the article…. is there a tag which i can add? What tag does the module display from? eg. <p> etc..

    Jason McDaniel Friend
    #288706

    I need to do this too. I haven’t heard any way yet. Please someone let us know.

    mitov Friend
    #288737

    It’s great to see the quality of customer service here… especially as it’s paid for….

    It would be nice to get an update as i and other people have paid to use your template and get some sort of a customer service and support. It’s no wonder i have not recommended Joomlart to anyone…

    Jason McDaniel Friend
    #288757

    For me the first picture is the most important of each article and that is why I put it on top. Someone must know how to do this. Anyone?

    John Wesley Brett Moderator
    #288758

    I’d be glad to try and help if one of you could give me a live URL.
    The demo is not operating as your problem describes…so I can’t use that to troubleshoot.

    Thanks,
    John.

    Jason McDaniel Friend
    #288918

    It is the same with all of them. It always shows the last image in an article but we want it to display the first. Something needs to be changed in the code.

    mitov Friend
    #289008

    <em>@jbrett 108910 wrote:</em><blockquote>I’d be glad to try and help if one of you could give me a live URL.
    The demo is not operating as your problem describes…so I can’t use that to troubleshoot.

    Thanks,
    John.</blockquote>

    Hi John,

    Thank you for your help… kindly appreciated. If you dont mind, i will send you a live URL through a private message as i do not want my website address posted.

    As the member above said, it’s the same with any website the module is installed on. It displays the last image instead of the first.

    Miro

    Jason McDaniel Friend
    #289284

    Mitov, Any feedback yet?

    imsleepy Friend
    #289290

    <em>@kingchachi2000 109566 wrote:</em><blockquote>Mitov, Any feedback yet?</blockquote>

    Since I have a fresh install of Teline II from the quickstart with all of the sample data still intact, I decided to give this a try.

    Using the first article, 3 Days in Puerto Rico, I added 2 additional photos as well as changed the first line of the text to something I understood.

    Result, the first line of text is what is shown, no problem there, however, I did wind up with the last photo of the article rather than the first.

    Off to see what I can figure out since I will be using this module with more than one photo in the article.

    Hope I have something to report soon.

    imsleepy Friend
    #289291

    Well, I didn’t have much luck. Tried changing the class for the photo, nothing worked. I just don’t see anything anywhere that would be an easy fix.

    There are two files:
    mod_jacatslwi.php
    helper.php

    I looked at both. I am just not as adept at php as I need to be to come up with a solution. I am sure the issue can be resolved with a modification to one or both of these, but I am really afraid to “tinker” with them, though I may do it anyway if no fix for this is found. I do have a couple of handy reference guides for php that have helped me in the past.

    Sorry I don’t have more to report. I will let you know if I figure anything out…. in the meantime maybe one of the php gurus might have a suggestion?

    mitov Friend
    #289533

    this is really starting to get to me…

    however… im not very experienced with php, but looking around on the net, couldent we do something with the regex function in the helper.php file?

    Is there a way to modify it to so that it only takes the image which has a number in the file name, for example?

    I have absolutely no idea, but it’s a wild guess?

    imsleepy Friend
    #289537

    I have no idea what to do. According to a couple of old posts I found about this problem, the helper.php file is the fix for this problem so I am lost.

    mitov Friend
    #289550

    FINALY!!!!!

    Ok, after a lot of playing around and some addition help, i have managed to come up with a TEMPORARY fix (until the admins see this post and decide to offer customer service!!!)

    Ok, inside the helper file, there is a php function called REGEX. What this does is provide the conditions to find the image. Someone helped me edit it to make it look for an image with a number inside the file name, between 1 and 9.

    So… here is what you do:

    1. Rename the file you want to appear so that the file name ends in a single number. eg demo1.jpg. Make sure that no other pictures/images in the post/article have a number in the file name. Make sure there is no number in the path leading to the file name. If you have a path such as public_html/images/stories7/demo.jpg it WILL not work!

    2. Navigate to the helper.php file, which can be found at root/public_html/modules/mod_jacatslwi/helper.php

    3. Open the file and find the line $regex = “/<img.+srcs*=s*”([^”]*)”[^>]*>/”;

    4. Replace it with the line $regex = “/<img.+?srcs*=s*”(.*?[0-9]+?[^”]*)”[^>]*>/”;

    5. Save the file. Refresh the page which holds the module and you should see it work…

    Its a lot quicker to do than it looks…

    ENJOY!

    Miro

    mitov Friend
    #289555

    ONE MORE THING YOU MUST DO… I HAVE JUST FOUND OUT!!!!!

    After you do the above, it dosent display any text…. so you need to remove one more line from the helper.php file. Find the line:

    $row->introtext = preg_replace( $regex1, ”, $row->introtext );

    and remove it… don’t add anything else!

    NOW WORKS LIKE A CHARM!

    imsleepy Friend
    #289558

    <em>@mitov 109891 wrote:</em><blockquote>FINALY!!!!!

    Ok, after a lot of playing around and some addition help, i have managed to come up with a TEMPORARY fix (until the admins see this post and decide to offer customer service!!!)

    Ok, inside the helper file, there is a php function called REGEX. What this does is provide the conditions to find the image. Someone helped me edit it to make it look for an image with a number inside the file name, between 1 and 9.

    So… here is what you do:

    1. Rename the file you want to appear so that the file name ends in a single number. eg demo1.jpg. Make sure that no other pictures/images in the post/article have a number in the file name. Make sure there is no number in the path leading to the file name. If you have a path such as public_html/images/stories7/demo.jpg it WILL not work!

    2. Navigate to the helper.php file, which can be found at root/public_html/modules/mod_jacatslwi/helper.php

    3. Open the file and find the line $regex = “/<img.+srcs*=s*”([^”]*)”[^>]*>/”;

    4. Replace it with the line $regex = “/<img.+?srcs*=s*”(.*?[0-9]+?[^”]*)”[^>]*>/”;

    5. Save the file. Refresh the page which holds the module and you should see it work…

    Its a lot quicker to do than it looks…

    ENJOY!

    Miro</blockquote>

    Fabulous FIX!!!! I actually like this fix. It allows me the flexibility to choose a photo anywhere in the article for the Hot Topic thing. I can have 10 photos and not just limited to the first photo with this fix (or the last) I can choose photo 4 as long as I give it a 1 in the name. This is great!!!! Thanks so much.

Viewing 15 posts - 1 through 15 (of 19 total)

This topic contains 19 replies, has 5 voices, and was last updated by  cofra 15 years, 6 months ago.

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