191
Roby73
Re: Problem with news1.66 and xoops 2.5
  • 2011/12/10 0:34

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


I have a problem in all my site with news 1.66 and xoops core 2.5.4.
I did not see if you have already reported this error.

I am set date dd/mm/yyyy but if i modify a news and the "Set the date/time of publish" is able, when submit the news date in "Set the date/time of publish" is displayed mm/dd/yyyy. Only in "Set the date/time of publish" is wrong.




192
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/8 23:37

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Quote:
If you guys feel comfortable with SVN, I can add you there, so you can continue on the development working together.


Thank you mamba.
I am very happy if I can be help



193
Roby73
Re: Module Profile 1.63 rc
  • 2011/12/8 23:32

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Class recaptcha is in the xoops core..
i think that google keys are to be included in the preferences system, not in a module



194
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/7 2:24

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


in the admin/menu.php i change code:

global $xoopsModule;

$module_handler =& xoops_gethandler('module');
$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
$pathIcon16 $moduleInfo->getInfo('icons16');
$pathIcon32 $moduleInfo->getInfo('icons32');


with:
$module_handler =& xoops_gethandler('module');
$xoopsModule =& XoopsModule::getByDirname('myguestbook');
$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
$pathIcon16 $moduleInfo->getInfo('icons16');
$pathIcon32 $moduleInfo->getInfo('icons32');


Because i have the error:

Fatal errorCall to a member function getVar() on a non-object in /membri/metalslug/modules/myguestbook/admin/menu.php on line 29


And change varchars:
facebook varchar(15) default NULL,
twitter varchar(15)


15 are very few



195
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/4 1:23

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


I removed some deprecated functions.
Please test it in localhttp://metalslug.altervista.org/myguestbook.zip



196
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/4 1:14

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Hi, to upgrade the module removing the deprecated functions,watching the code, is easy.

You have modified field icq to facebook, default characters to field icq are 15.
You must modify this value in your database.

In my local copy, number ip don't saved in database.
I modify the file sign.php line 95:

$ip=$GLOBALS['REMOTE_ADDR'];


to

$ip=$_SERVER['REMOTE_ADDR'];


and to display ip in icon server you must modify "alt" to "title" in tag img...

change your code at line 151 (index.php) with:

if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {

        
$entry[$i]['admin_option']  = "<p align='right'><img src='images/ip.gif' title='".$array_total_entry[$i]["ip"]."' /><a href='admin/index.php?op=editEntry&id=".$array_total_entry[$i]["id"]."'>&nbsp;<img src='images/edit.gif' alt='"._NAR_EDIT."' border='0' /></a><a href='admin/index.php?op=delEntry&id=".$array_total_entry[$i]["id"]."'>&nbsp;<img src='images/del.gif' alt='"._NAR_DELETEPOST."' border='0' /></a></p>";

    }


if you want view directly the number ip without icon server, change with:

if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {

        
$entry[$i]['admin_option']  = "<p align='right'>".$array_total_entry[$i]["ip"]."<a href='admin/index.php?op=editEntry&id=".$array_total_entry[$i]["id"]."'>&nbsp;<img src='images/edit.gif' alt='"._NAR_EDIT."' border='0' /></a><a href='admin/index.php?op=delEntry&id=".$array_total_entry[$i]["id"]."'>&nbsp;<img src='images/del.gif' alt='"._NAR_DELETEPOST."' border='0' /></a></p>";

    }




197
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/2 22:19

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


The module is very old, have much deprecated functions.

This is a simple code to add captcha code.

Replace sign.php file with:
<?php

###############################################################################

#                  Narga's Guestbook v.1.0 for Xoops 2.x                      #

#             Writen by  Nguyen Dinh Quan (webmaster@narga.tk)                #

#      :: Narga Vault :-: The Land Of Dreams ::(http://www.narga.tk)          #

#   ------------------------------------------------------------------------- #

#       A produce of [:: Narga Laboratory ::] (http://www.nargalab.info)      #

#   ------------------------------------------------------------------------- #

#   This program is free software; you can redistribute it and/or modify      #

#   it under the terms of the GNU General Public License as published by      #

#   the Free Software Foundation; either version 2 of the License, or         #

#   (at your option) any later version.                                       #

#                                                                             #

#   This program is distributed in the hope that it will be useful,           #

#   but WITHOUT ANY WARRANTY; without even the implied warranty of            #

#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             #

#   GNU General Public License for more details.                              #

#                                                                             #

#   You should have received a copy of the GNU General Public License         #

#   along with this program; if not, write to the Free Software               #

#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  #

#   ------------------------------------------------------------------------  #

###############################################################################

// $Id: sign.php,v 1.2.1 Date: 8/30/2004 10:37 PM, Author: Nguyen Dinh Quan Exp $

include_once "header.php";

if ( empty(
$_POST['submit']) ) {

    
$xoopsOption['template_main'] = 'myguestbook_sign.html';

    include 
XOOPS_ROOT_PATH."/header.php";

    include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";

//Get the user database

    
$company_v "";

    
$name_v = !empty($xoopsUser) ? $xoopsUser->getVar("uname""E") : "";

    
$email_v = !empty($xoopsUser) ? $xoopsUser->getVar("email""E") : "";

    
$url_v = !empty($xoopsUser) ? $xoopsUser->getVar("url""E") : "";

    
$icq_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_icq""E") : "";

    
$msn_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_msnm""E") : "";

    
$aim_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_aim""E") : "";

    
$yim_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_yim""E") : "";

    
$location_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_from""E") : "";

    
$message_v "";

    
$title_v "";

    
//Make form type

    
$name_text = new XoopsFormText(_NAR_NAME"usersName"50100$name_v);

    
$email_text = new XoopsFormText(_NAR_EMAIL"usersEmail"50100$email_v);

    
$gender_select = new XoopsFormSelect(_NAR_SELGEN"userGender",3);

    
$gender_select->addOptionArray(array("3"=>_NAR_SELGEN,"0"=>_NAR_MALE,"1"=>_NAR_FEMALE,"2"=>_NAR_OTHER));

    
$url_text = new XoopsFormText(_NAR_URL"usersSite"50100$url_v);

    
$icq_text = new XoopsFormText(_NAR_ICQ"usersICQ"50100$icq_v);

    
$msn_text = new XoopsFormText(_NAR_MSN"usersMSN"50100$msn_v);

    
$aim_text = new XoopsFormText(_NAR_AIM"usersAIM"50100$aim_v);

    
$yim_text = new XoopsFormText(_NAR_YIM"usersYIM"50100$yim_v);

    
$company_text = new XoopsFormText(_NAR_COMPANY"usersCompanyName"50100$company_v);

    
$location_text = new XoopsFormText(_NAR_LOCATION"usersCompanyLocation"50100$location_v);

    
$title_text = new XoopsFormText(_NAR_TITLE"usersTitle"50100$title_v);

    
$message_textarea = new XoopsFormDhtmlTextArea(_NAR_MESSAGE"usersMessage"$message_v);

    
$submit_button = new XoopsFormButton("""submit"_NAR_SEND"submit");

    
$myguestbook_form = new XoopsThemeForm(_NAR_SIGNGUESTBOOK"myguestbookform""sign.php");

//Fill data to form text

    
$myguestbook_form->addElement($name_texttrue);

    
$myguestbook_form->addElement($gender_select,3);

    
$myguestbook_form->addElement($email_texttrue);

    
$myguestbook_form->addElement($url_text);

    
$myguestbook_form->addElement($icq_text);

    
$myguestbook_form->addElement($msn_text);

    
$myguestbook_form->addElement($aim_text);

    
$myguestbook_form->addElement($yim_text);

    
$myguestbook_form->addElement($company_text);

    
$myguestbook_form->addElement($location_text);

    
$myguestbook_form->addElement($title_text);

    
$myguestbook_form->addElement($message_textareatrue);
    
$myguestbook_form->addElement(new XoopsFormCaptcha(), true);

    
$myguestbook_form->addElement($submit_button);

    
$myguestbook_form->assign($xoopsTpl);

    
//Assign data to smarty tpl

    
$xoopsTpl->assign('lang_index'_NAR_BACKGUESTBOOK);

    
$xoopsTpl->assign('lang_info'_NAR_DESC);

    
$xoopsTpl->assign('lang_copyright'_NAR_COPYRIGHT);

    
$xoopsTpl->assign('lang_writing'_NAR_SIGNGUESTBOOK);

    
$xoopsTpl->assign('lang_gender'_NAR_GENDER);

    
$xoopsTpl->assign('lang_title'_NAR_TITLE);

    
$xoopsTpl->assign('lang_cancel'_CANCEL);

    
$xoopsTpl->assign('lang_nameenter'_NAR_NAMEENTER);

    
$xoopsTpl->assign('lang_msenter'_NAR_MSENTER);

    include 
XOOPS_ROOT_PATH."/footer.php";

} else {
    
extract($_POST);

    
extract($_POST);    

    
$myts =& MyTextSanitizer::getInstance();

    
$name_text $myts->stripSlashesGPC($usersName);

    
$title_text $myts->stripSlashesGPC($usersTitle);

    
$message_textarea $myts->stripSlashesGPC($usersMessage);

    
$date=time();

    
$email $myts->stripSlashesGPC($usersEmail);

    
$url_text $myts->stripSlashesGPC($usersSite);

    
$ip=$GLOBALS['REMOTE_ADDR'];

    
$gender_select $myts->stripSlashesGPC($userGender);

    
$icq_text $myts->stripSlashesGPC($usersICQ);

    
$aim_text $myts->stripSlashesGPC($usersAIM);

    
$yim_text $myts->stripSlashesGPC($usersYIM);

    
$msn_text $myts->stripSlashesGPC($usersMSN);

    
$location_text $myts->stripSlashesGPC($usersCompanyLocation);

    
$company_text $myts->stripSlashesGPC($usersCompanyName);
    
xoops_load('XoopsCaptcha');

        
$xoopsCaptcha XoopsCaptcha::getInstance();

       if (!
$xoopsCaptcha->verify()) {

    
redirect_header('sign.php'3$xoopsCaptcha->getMessage());    
    exit;
    }

//Insert info to database

    
$sqlinsert="INSERT INTO ".$xoopsDB->prefix("myguestbook")." (name,title,message,time,email,url,ip,gender,icq,yim,aim,msn,location,company) VALUES ('".$name_text."','".$title_text."','".$message_textarea."','".$date."','".$email."','".$url_text."','".$ip."','".$gender_select."','".$icq_text."','".$yim_text."','".$aim_text."','".$msn_text."','".$location_text."','".$company_text."')";

    if ( 
$xoopsModuleConfig['sendmail'] == 

    {

    
$subject $xoopsConfig['sitename']." - "._NAR_NEWMESSAGE;

    
$xoopsMailer =& xoops_getMailer();

    
$xoopsMailer->useMail();

    
$xoopsMailer->setToEmails($xoopsConfig['adminmail']);

    
$xoopsMailer->setFromEmail($email);

    
$xoopsMailer->setFromName($xoopsConfig['sitename']);

    
$xoopsMailer->setSubject($subject"-"$conf_subject);

    
$xoopsMailer->setBody($message_textarea);

    
$xoopsMailer->send();

    }

    if ( !
$result $xoopsDB->query($sqlinsert) ) 

            {

                echo 
_NAR_ERRORINSERT;

            }

                    
redirect_header("index.php",2,_NAR_RECEIVED);

    exit();

}

include_once 
XOOPS_ROOT_PATH.'/footer.php';

?>



198
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/2 17:21

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


I can try add it, tonight install in local the module to test.



199
Roby73
Re: Please help me with MyGuestbook
  • 2011/12/2 16:18

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


That xoops version you use?
Would be possible add captcha/recaptcha code.



200
Roby73
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2011/11/30 23:29

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


There is a list with all deprecated functions in xoops 2.5.4?
Thank you.




TopTop
« 1 ... 17 18 19 (20) 21 22 23 ... 25 »



Login

Who's Online

225 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 225


more...

Donat-O-Meter

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

Latest GitHub Commits