test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • jcsanjurjo Friend
    #183546

    Hi, 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 Moderator
    #477985

    The 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 Friend
    #478278

    Hi @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 Moderator
    #478421

    You 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 Friend
    #478780

    Hi @saguaros, I sent some days ago via PM the credentials of my test site. Could you had a look on this issue?

    Thanks in advance

    Saguaros Moderator
    #478859

    Hi 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

    jcsanjurjo Friend
    #479236

    Great @saguaros. Solved!

    Thank you

    Saguaros Moderator
    #479379

    You’re welcome.

    Best Regards

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

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