-
AuthorPosts
-
mitov Friend
mitov
- Join date:
- August 2008
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
January 23, 2009 at 6:26 pm #137420Hi 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 FriendJason McDaniel
- Join date:
- September 2014
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 4
January 28, 2009 at 7:46 pm #288706I need to do this too. I haven’t heard any way yet. Please someone let us know.
mitov Friendmitov
- Join date:
- August 2008
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
January 28, 2009 at 11:59 pm #288737It’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 FriendJason McDaniel
- Join date:
- September 2014
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 4
January 29, 2009 at 5:57 am #288757For 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 ModeratorJohn Wesley Brett
- Join date:
- July 2013
- Posts:
- 2142
- Downloads:
- 17
- Uploads:
- 26
- Thanks:
- 175
- Thanked:
- 645 times in 426 posts
January 29, 2009 at 6:02 am #288758I’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 FriendJason McDaniel
- Join date:
- September 2014
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 4
January 30, 2009 at 7:44 am #288918It 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 Friendmitov
- Join date:
- August 2008
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
January 30, 2009 at 6:49 pm #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 FriendJason McDaniel
- Join date:
- September 2014
- Posts:
- 39
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 4
February 3, 2009 at 2:07 am #289284Mitov, Any feedback yet?
imsleepy Friendimsleepy
- Join date:
- January 2009
- Posts:
- 451
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 94
- Thanked:
- 45 times in 1 posts
February 3, 2009 at 3:19 am #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 Friendimsleepy
- Join date:
- January 2009
- Posts:
- 451
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 94
- Thanked:
- 45 times in 1 posts
February 3, 2009 at 3:43 am #289291Well, 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.phpI 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 Friendmitov
- Join date:
- August 2008
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
February 4, 2009 at 8:05 pm #289533this 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 Friendimsleepy
- Join date:
- January 2009
- Posts:
- 451
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 94
- Thanked:
- 45 times in 1 posts
February 4, 2009 at 8:35 pm #289537I 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 Friendmitov
- Join date:
- August 2008
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
February 4, 2009 at 10:24 pm #289550FINALY!!!!!
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 Friendmitov
- Join date:
- August 2008
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
February 4, 2009 at 10:37 pm #289555ONE 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 Friendimsleepy
- Join date:
- January 2009
- Posts:
- 451
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 94
- Thanked:
- 45 times in 1 posts
February 4, 2009 at 10:47 pm #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.
-
AuthorPosts
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