-
AuthorPosts
-
jcsanjurjo Friend
jcsanjurjo
- Join date:
- May 2012
- Posts:
- 116
- Downloads:
- 0
- Uploads:
- 46
- Thanks:
- 26
- Thanked:
- 2 times in 1 posts
December 31, 2012 at 5:47 pm #183546Hi, I’m having problems with the JA Twitter module when showing some special characters in the frontend
Originally the tweet was “… <— Blog …” and what is shown in the frontend by JA Twitter is “… <— Blog …”
Do you know how to solve that?
Thanks in advance, and happy 2013
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
December 31, 2012 at 6:36 pm #477985The first “research/learning tool” I like to suggest in situations like this is to utilize JA’s DEMO BUILDER as tool to cross-reference the settings from the demo version (with all demo modules/functions assumedly working as they should) against your own settings – to make sure you have things configured correctly.
(not to suggest that you don’t … but just in case). 😎
jcsanjurjo Friendjcsanjurjo
- Join date:
- May 2012
- Posts:
- 116
- Downloads:
- 0
- Uploads:
- 46
- Thanks:
- 26
- Thanked:
- 2 times in 1 posts
January 3, 2013 at 1:30 pm #478278Hi @tomc, I have been trying the JA Twitter module behaviour in JA Demo Builder, and is exactly the same than in my site. The char < (less than) in a tweet is shown by JA Twitter on the frontend as <
Please could you or someone have a look on this ??
Thanks in advance and my best whishes for 2013
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 4, 2013 at 9:10 am #478421You can PM me an admin account with url of site you’re working on, I shall check directly on your site since I cann’t see the same error in my local
jcsanjurjo Friendjcsanjurjo
- Join date:
- May 2012
- Posts:
- 116
- Downloads:
- 0
- Uploads:
- 46
- Thanks:
- 26
- Thanked:
- 2 times in 1 posts
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 8, 2013 at 3:38 am #478859Hi Joan,
You can try this way:
– Open file: modulesmod_jatwitterhelper.php
– There will be a function:
[PHP]
function convert($description)
{
$description = preg_replace(‘#(^|[n ])@([^ “tnr<]*)#ise’, “‘\1<a href=”http://www.twitter.com/\2″ >@\2</a>'”, $description);
$description = preg_replace(‘#(^|[n ])([w]+?://[w]+[^ “nrt<]*)#ise’, “‘\1<a href=”\2″ >\2</a>'”, $description);
$description = preg_replace(‘#(^|[n ])((www|ftp).[^ “tnr<]*)#ise’, “‘\1<a href=”http://\2″ >\2</a>'”, $description);
$description = preg_replace(‘#(^|[n ])#([^ “tnr<:]*)#ise’, “‘\1<a target=”_blank” href=”http://twitter.com/search?q=#\2″ >\2</a>'”, $description);
$description = str_replace(‘&’, ‘&’, $description);
$description = str_replace(‘&’, ‘&’, $description);
return $description;
}
[/PHP]You can replace with:
[PHP]
function convert($description)
{$description = preg_replace(‘#(^|[n ])@([^ “tnr<]*)#ise’, “‘\1<a href=”http://www.twitter.com/\2″ >@\2</a>'”, $description);
$description = preg_replace(‘#(^|[n ])([w]+?://[w]+[^ “nrt<]*)#ise’, “‘\1<a href=”\2″ >\2</a>'”, $description);
$description = preg_replace(‘#(^|[n ])((www|ftp).[^ “tnr<]*)#ise’, “‘\1<a href=”http://\2″ >\2</a>'”, $description);
$description = preg_replace(‘#(^|[n ])#([^ “tnr<:]*)#ise’, “‘\1<a target=”_blank” href=”http://twitter.com/search?q=#\2″ >\2</a>'”, $description);
htmlspecialchars_decode($description);
return $description;
}
[/PHP]Clean all cache and refresh your site again.
Regards
1 user says Thank You to Saguaros for this useful post
jcsanjurjo Friendjcsanjurjo
- Join date:
- May 2012
- Posts:
- 116
- Downloads:
- 0
- Uploads:
- 46
- Thanks:
- 26
- Thanked:
- 2 times in 1 posts
-
AuthorPosts
This topic contains 8 replies, has 3 voices, and was last updated by Saguaros 11 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum