1
ziwman
Re: Encoding Problem (xNews module)
  • 2013/11/29 20:47

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:

Mamba wrote:
Can you install and test the News module?

xNews has never left the beta stage, and is not developed anymore by the developer who worked on this. So I don't know if anybody has the time to fix a module that is abandoned.

Personally, I don't deal with Facebook, so I don't have any experience with Open Graph etc. Maybe somebody else could help....



It's really not about OpenGraph API integration (The problem appears in page Source Code and while trying to validate via W3C, it gives an error)

News module ? I will give a try and let you know ...
Thanks !



2
ziwman
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:36

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


i've added language tag via og:local in the theme.html header ! that doesn't solve the problem.

1.
Question : Why the Arabic characters works fine in Newbb module ?


2. The character problem figure only in the article.php page !

When i try to debug the xNews home page, the arabic characters appear correctly.
LINK :https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tafraout.net%2Fmodules%2Fxnews



3
ziwman
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:09

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:

Mamba wrote:
When you look at the "scraped URL" on the Facebook Debug link that you gave us, you can see that Facebook sees correctly the title provided by xNews:

<title>
                            
سدفدفدف XOOPS xNews -
                                            
Portail de Tafraout et ses régions
        
</title>


What it has problems with, is the Facebook elements like:

<meta property="og:title" content="
                            Ø³Ø¯ÙØ¯ÙØ¯Ù - XOOPS - xNews -
                                            Portail de Tafraout et ses régions"
>


Now, if you google for something like "facebook open graph Object Properties wrong international character set", you'll find that other people had also problems with it. Hopefully some of the solutions there will help you to fix the issue.

One of the postings indicates that it might be an issue with wrong "og:locale" tags. You don't have them in your page at all, so maybe this is the issue that Facebook doesn't know how to interpreter it .

This link to Facebook "Internationalization/Localization" might be helpful.

Remember: always google for things! The chances that somebody had already a similar problem are always very high!


Sure !!
i've checked the og: documentation ! No problem with fb og: configuration.

I think the problem is at xNews module, because Newbb shows no anomaly

Check this Newbb page :
http://www.tafraout.net/modules/newbb/viewtopic.php?topic_id=2160&forum=16

Test on Facebook debugger :
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tafraout.net%2Fmodules%2Fnewbb%2Fviewtopic.php%3Ftopic_id%3D2160%26forum%3D16




4
ziwman
Encoding Problem (xNews module)
  • 2013/11/29 17:00

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Hi !
I'm using xNews module to manage News and blog content for tafraout.net community website.

As we are a moroccan community, we will publish news in Arabic characters.

When i publish an article with arabic characters (Title, scoop & content using admin or submission form on the front end), the article page show the characters, but when i share the page on Facebook, the characters are remplaced with : سدÙدÙد٠either, characters like "é" are replaced with "دÙ"

The MySQL database is UTF8 endcoding, the title, scoop and contect field too !
I forced the UTF8 output on the theme.html page !

For example, while i post on Newbb forum a title and contect with Arabic characters, Sharing the page on facebook shows the characters without problem.
I think it's a bad configuration on the xNews module

NB : i've tried News and Publisher module .. they have the sam issue !

Can someone help me to fix this problem ?
Thank you :

Page with arabic characters :
http://www.tafraout.net/modules/xnews/article.php?storyid=2

Testing the page using Facebook debugger :
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tafraout.net%2Fmodules%2Fxnews%2Farticle.php%3Fstoryid%3D2



5
ziwman
Include usermenu block function anywhere
  • 2013/11/22 17:01

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Hello !
I'm building my own xoops theme.

I want to integrate the user menu (Login + logged-in user) in the a menu bar.

i want to call and include functions of the block,
When i copy/past Language variants (messages ... ) it doesn't work !

I've added a new page : navbar.html

code :

<nav class="navbar navbar-default" role="navigation">
    <!-- 
Brand and toggle get grouped for better mobile display -->
    <
div class="navbar-header">
        <
button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <
span class="sr-only">Toggle navigation</span>
            <
span class="icon-bar"></span>
            <
span class="icon-bar"></span>
            <
span class="icon-bar"></span>
        </
button>
        <
class="navbar-brand" href="#">Menu</a>
    </
div>
    <!-- 
Collect the nav linksforms, and other content for toggling -->
    <
div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <
ul class="nav navbar-nav">
            <
li class="divider-vertical"></li>
            <
li>
                <
a href="http://www.tafraout.net/">Accueil</a>
            </
li>
            <
li class="divider-vertical"></li>
            <
li>
                <
a href="http://www.tafraout.net/modules/newbb">Forums</a>
            </
li>
            <
li class="divider-vertical"></li>
            <
li>
                <
a href="http://www.tafraout.net/modules/contact">Contact</a>
            </
li>
            <
li class="divider-vertical"></li>
        </
ul>
        <
ul class="nav navbar-nav navbar-right">


            <{if 
$xoops_isuser}>
                <
li class="dropdown">
                    <
a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <
class="glyphicon glyphicon-user"></iEspace Membre
                        
<{if $block.new_messages>0}>
                            <
span class="badge">
                                <{
$block.new_messages}>
                            </
span>
                            <{else}>
                                <{/if}>
                                    <
class="caret"></b>
                    </
a>
                    <
ul class="dropdown-menu">
                        <{if 
$xoops_isadmin}>
                            <
li>
                                <
a href="<{xoAppUrl admin.php}>" title="<{$block.lang_adminmenu}>">
                                    <
class="glyphicon glyphicon-wrench"></i>
                                    <{
$block.lang_adminmenu}>
                                </
a>
                            </
li>
                            <
li class="divider"></li>
                            <
li>
                                <
a href="<{xoAppUrl user.php}>" title="<{$block.lang_youraccount}>">
                                    <
class="glyphicon glyphicon-user"></i>
                                    <{
$block.lang_youraccount}>
                                </
a>
                            </
li>
                            <
li class="divider"></li>
                            <{else}>
                                <
li>
                                    <
a href="<{xoAppUrl user.php}>" title="<{$block.lang_youraccount}>">
                                        <
class="glyphicon glyphicon-user"></i>
                                        <{
$block.lang_youraccount}>
                                    </
a>
                                </
li>
                                <
li class="divider"></li>
                                <{/if}>
                                    <
li>
                                        <
a href="<{xoAppUrl edituser.php}>" title="<{$block.lang_editaccount}>">
                                            <
class="glyphicon glyphicon-edit"></i>
                                            <{
$block.lang_editaccount}>
                                        </
a>
                                    </
li>
                                    <
li class="divider"></li>
                                    <
li>
                                        <
a href="<{xoAppUrl notifications.php}>" title="<{$block.lang_notifications}>">
                                            <
class="glyphicon glyphicon-bell"></i>
                                            <{
$block.lang_notifications}>
                                        </
a>
                                    </
li>
                                    <
li class="divider"></li>
                                    <{if 
$block.new_messages>0}>
                                        <
li>
                                            <
audio autoplay>
                                                <
source src="<{xoImgUrl sound/sound.ogg}>" type="audio/ogg">
                                                    <
source src="<{xoImgUrl sound/sound.mp3}>" type="audio/mpeg">
                                            </
audio>
                                            <
class="highlight" href="<{xoAppUrl viewpmsg.php}>" title="<{$block.lang_inbox}>">
                                                <
class="glyphicon glyphicon-envelope"></i>
                                                <{
$block.lang_inbox}>(
                                                    <
strong class="red">
                                                        <{
$block.new_messages}>
                                                    </
strong>)</a>
                                        </
li>
                                        <
li class="divider"></li>
                                        <{else}>
                                            <
li>
                                                <
a href="<{xoAppUrl viewpmsg.php}>" title="<{$block.lang_inbox}>">
                                                    <
class="glyphicon glyphicon-envelope"></i>
                                                    <{
$block.lang_inbox}>
                                                </
a>
                                            </
li>
                                            <
li class="divider"></li>
                                            <{/if}>
                                                <
li>
                                                    <
a href="<{xoAppUrl user.php?op=logout}>" title="<{$block.lang_logout}>">
                                                        <
class="glyphicon glyphicon-off"></i>
                                                        <{
$block.lang_logout}>
                                                    </
a>
                                                </
li>
                    </
ul>
                </
li>
                <{else}>
                    <
li class="divider-vertical"></li>
                    <
li>
                        <
a href="http://www.tafraout.net/">
                            <
class="glyphicon glyphicon-plus"></i>  S'inscrire</a>
                    </li>
                    <li>
                        <a data-toggle="modal" data-target="#LoginModal">
                            <i class="glyphicon glyphicon-log-in"></i>  Se Connecter</a>
                    </li>
                    <{/if}>
        </ul>
    </div>
    <!-- /.navbar-collapse -->
</nav>
<{if $xoops_isuser}>
    <{else}>
        <div class="modal" id="LoginModal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Se connecter</h4>
                    </div>
                    <div class="modal-body">
                        <!-- LOGIN FORM -->
                        <form action="<{xoAppUrl user.php}>" method="post">
                            <div class="form-group">
                                <input type="text" name="uname" value="<{$block.unamevalue}>" class="form-control" placeholder="Identifiant" required autofocus />
                            </div>
                            <div class="form-group">
                                <input type="password" name="pass" class="form-control" placeholder="Mot de passe" required />
                            </div>
                            <input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" />
                            <input type="hidden" name="op" value="login" />
                            <label class="checkbox">
                                <input type="checkbox" name="rememberme" value="remember-me" />Se rappeler de moi</label>
                            <script type="text/javascript">
                                $(function() {
                                    $('
button[data-loading-text]').click(function () {
                                        var btn = $(this);
                                        btn.button('
loading');
                                    });
                                });
                            </script>
                            <button class="btn btn-primary btn-block" data-loading-text="Connexion en cours ..." type="submit">Se connecter</button>
                        </form>
                        <a class="forgotLnk" style="  margin-top: 10px;
    display: block;" href="<{xoAppUrl user.php#lost}>" title="<{$block.lang_lostpass}>">Mot de passe perdu ?</a>
                    </div>
                    <div class="modal-header">
                        <h4 class="modal-title">Nouveau ?</h4>
                    </div>
                    <div class="modal-body">
                        <a href="<{xoAppUrl register.php}>" title="<{$block.lang_registernow}>" class="btn btn-info btn-block"> S'
inscrire maintenant !</a>
                    </
div>
                </
div>
                <!-- 
LOGIN FORM -->
            </
div>
        </
div>
        <!-- /.
modal-content -->
        </
div>
        <!-- /.
modal-dialog -->
        </
div>
        <{/if}>




6
ziwman
Re: Problem : Password Recovery process
  • 2013/11/22 16:50

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Fixed !

I changed actions "Show message" instead of header redirection ! using customized messages ...

Code :

<?php
include dirname(__FILE__) . DIRECTORY_SEPARATOR 'mainfile.php';

$xoopsPreload =& XoopsPreload::getInstance();
$xoopsPreload->triggerEvent('core.lostpass.start');

xoops_loadLanguage('user');

$email = isset($_GET['email']) ? trim($_GET['email']) : '';
$email = isset($_POST['email']) ? trim($_POST['email']) : $email;

if (
$email == '') {
    
redirect_header("user.php"2_US_SORRYNOTFOUND);
    exit();
}

$myts =& MyTextSanitizer::getInstance();
$member_handler =& xoops_gethandler('member');
$getuser =& $member_handler->getUsers(new Criteria('email'$myts->addSlashes($email)));

if (empty(
$getuser)) {
    include 
$GLOBALS['xoops']->path('header.php');
        
        echo 
"<br><br><br>
        <div class='alert alert-danger'><p><strong>Oups!</strong><br>Aucun utilisateur n'est enregistré avec l'adresse e-mail mentionnée. Merci de réessayer ou contactez l'administrateur : <strong>contact@tafraout.net</strong></p>
        <p><a href='user.php' class='btn btn-primary'>Réessayer</a></p>
        </div>"
;
       
        include 
$GLOBALS['xoops']->path('footer.php');
    exit();
} else {
    
$code = isset($_GET['code']) ? trim($_GET['code']) : '';
    
$areyou substr($getuser[0]->getVar("pass"), 05);
    if (
$code != '' && $areyou == $code) {
        
$newpass xoops_makepass();
        
$xoopsMailer =& xoops_getMailer();
        
$xoopsMailer->useMail();
        
$xoopsMailer->setTemplate("lostpass2.tpl");
        
$xoopsMailer->assign("SITENAME"$xoopsConfig['sitename']);
        
$xoopsMailer->assign("ADMINMAIL"$xoopsConfig['adminmail']);
        
$xoopsMailer->assign("SITEURL"XOOPS_URL "/");
        
$xoopsMailer->assign("IP"$_SERVER['REMOTE_ADDR']);
        
$xoopsMailer->assign("NEWPWD"$newpass);
        
$xoopsMailer->setToUsers($getuser[0]);
        
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
        
$xoopsMailer->setFromName($xoopsConfig['sitename']);
        
$xoopsMailer->setSubject(sprintf(_US_NEWPWDREQXOOPS_URL));
        if (! 
$xoopsMailer->send()) {
            echo 
$xoopsMailer->getErrors();
        }
        
// Next step: add the new password to the database
        
$sql sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u"$xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid'));
        if (!
$xoopsDB->queryF($sql)) {
            include 
$GLOBALS['xoops']->path('header.php');
            echo 
_US_MAILPWDNG;
            include 
$GLOBALS['xoops']->path('footer.php');
            exit();
        }
        include 
$GLOBALS['xoops']->path('header.php');
        
        echo 
"<br><br><br><div class='alert alert-success'><strong>Votre mot de passe a été changé avec succès.</strong><br>
        Nous avons envoyé un nouveau mot de passe à votre adresse e-mail. Merci de consulter votre boite de réception.</div>"
;
       
        include 
$GLOBALS['xoops']->path('footer.php');
        
header"refresh:10;url=user.php" );
        
// If no Code, send it
    
} else {
        
$xoopsMailer =& xoops_getMailer();
        
$xoopsMailer->useMail();
        
$xoopsMailer->setTemplate("lostpass1.tpl");
        
$xoopsMailer->assign("SITENAME"$xoopsConfig['sitename']);
        
$xoopsMailer->assign("ADMINMAIL"$xoopsConfig['adminmail']);
        
$xoopsMailer->assign("SITEURL"XOOPS_URL "/");
        
$xoopsMailer->assign("IP"$_SERVER['REMOTE_ADDR']);
        
$xoopsMailer->assign("NEWPWD_LINK"XOOPS_URL "/lostpass.php?email=" $email "&code=" $areyou);
        
$xoopsMailer->setToUsers($getuser[0]);
        
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
        
$xoopsMailer->setFromName($xoopsConfig['sitename']);
        
$xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ$xoopsConfig['sitename']));
        include 
$GLOBALS['xoops']->path('header.php');
        if (! 
$xoopsMailer->send()) {
            echo 
$xoopsMailer->getErrors();
        }
       
        echo 
"<br><br><br><div class='alert alert-warning'>Nous avons envoyé un e-mail à l'adresse <strong>" $email "</strong> <br> Merci de consulter votre boite de réception, vous y trouverez un lien confidentiel qui vous permettra de recevoir un nouveau mot de passe.</div>";
        
        include 
$GLOBALS['xoops']->path('footer.php');
    }
}

?>



7
ziwman
Re: Problem : Password Recovery process
  • 2013/11/21 16:35

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:

Bleekk wrote:
can you please switch to the default theme, activate the profile module and try again


Still the same problem using the default temp. :(



8
ziwman
Re: Problem : Password Recovery process
  • 2013/11/21 16:13

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:

Bleekk wrote:
try to disable the profile module and try it then please again


Hello Bleek,

Following your recommandation. When I click on the password recovery link sent by mail, It redirect me to the user.php page without ANY MESSAGE. but I receive the second e-mail with the new password.

Should I keep the Profil module desactivated ?
How to fix the Confirmation message while clicking on the password recovery link ?

Thanks !



9
ziwman
Problem : Password Recovery process
  • 2013/11/21 14:28

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Hello Xoops Community,

I'm back after 6 years ... I used Xoops to animate a community in 2006.
I've just installed the last xoops version and migrate Xoops Users + forums from my outdated xoops version.

The problem is, when i try to recover my password via : Lost Password link. i got the E-mail with recovery link. the linkhttp://www.tafraout.net/modules/profile/lostpass.php?email=xx@xxxxx.xx&code=xxx send me to user page without any visible action ! i have to refresh the page twice to get the message that Xoops sent me my new password.

Checking my inbox, i find the e-mail with new password, 2 sec. after, i receive a new Recovery Password E-mail with a new recovery link !




10
ziwman
Re: McDonalds Store
  • 2008/12/8 18:10

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:
Thats all very generous, but does he have to convert his site to XOOPS for that?

Obligatory




TopTop
(1) 2 »



Login

Who's Online

228 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 228


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits