51
Cavan
Re: AMS 2.2 *again*
  • 2005/2/27 22:23

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Quote:
There are more problems with misconfigured hosting services than there are with bad XOOPS modules.


Personally, I feel this last post is off-topic and I doubt the validity of the quoted statement. Considering my host offers 24-hour support, 7 days a week and 365 days a year (as any host should), and with the fact that they have worked with me in resolving all the issues (except the news module problem, which they have been unable to replicate/resolve) that arose after taking Xoops' advice to dump my temp folder, I don't see the logic in simply placing the blame on them and not with the XOOPS CMS (and me, of course).

I've used the same host for over two years now and compared to most of the stories I've read about bad hosting services, I can't recount my own experience (with my host) as anything but excellent (they're also relatively inexpensive and offer a lot for your money). Every time I need support, they're there for me.

No offense intended but your advice appears biased (to me) and is of no use in solving this problem---thanks anyway.

52
brash
Re: AMS 2.2 *again*
  • 2005/2/27 23:36

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


I personally think you cannot fully blame one or the other. Most Xoop modules work with default PHP configrations, and it is when Hosts use custom PHP environments that you'll find most problems occur. Who is at fault here, the XOOPS developer for not ensuring that their module works with every PHP setting, or the Host for using a custom setting?

Anyway, back on track. I am totally stumped here, and in no way can I reproduce this issue of only being able to submit an article if you preview it first. This will almost certainly be a PHP configuration issue with your host, as this is the only case I have come across of this exact issue. AMS does work in a default PHP environment, so about the only thing I can think of is to take a look where your environment differs from the default one. For example I can tell you that magic_quotes_gpc WILL cause issues with AMS and is turned off by default, but is enabled in your environment.

53
Rhomal
Re: AMS 2.2 *again*
  • 2005/2/28 2:04

  • Rhomal

  • Quite a regular

  • Posts: 274

  • Since: 2004/10/5


On a side note if anyone has a script to go back to the standard news module from AMS I would be very interested in getting it, thanks for any help on this.

54
Cavan
Re: AMS 2.2 *again*
  • 2005/2/28 2:19

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Quote:

brash wrote:

AMS does work in a default PHP environment, so about the only thing I can think of is to take a look where your environment differs from the default one. For example I can tell you that magic_quotes_gpc WILL cause issues with AMS and is turned off by default, but is enabled in your environment.


brash:

I'll sidestep the 'blame game' and get back to the problem at hand:

1. Not being overly proficient with php/mysql (I'm capable at best), I don't know how to tell the difference between my current environment and a "default" environment. I only know what's already there (as I previously posted).

2. Is having magic_quotes_gpc on necessary for any of the XOOPS modules (forums, et al)? What positive/negative effect is generated by turning it off, if any?

55
brash
Re: AMS 2.2 *again*
  • 2005/2/28 3:27

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Easiest way would be to look at the PHP config file included with the PHP distro. I copied this from the php.ini-recommended file included with the Windows 4.3.10 distro;

Quote:

; - register_globals = Off [Security, Performance]
; Global variables are no longer registered for input data (POST, GET, cookies,
; environment and other server variables). Instead of using $foo, you must use
; you can use $_REQUEST["foo"] (includes any variable that arrives through the
; request, namely, POST, GET and cookie variables), or use one of the specific
; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
; on where the input originates. Also, you can look at the
; import_request_variables() function.
; Note that register_globals is going to be depracated (i.e., turned off by
; default) in the next version of PHP, because it often leads to security bugs.
; Readhttp://php.net/manual/en/security.registerglobals.php for further
; information.
; - display_errors = Off [Security]
; With this directive set to off, errors that occur during the execution of
; scripts will no longer be displayed as a part of the script output, and thus,
; will no longer be exposed to remote users. With some errors, the error message
; content may expose information about your script, web server, or database
; server that may be exploitable for hacking. Production sites should have this
; directive set to off.
; - log_errors = On [Security]
; This directive complements the above one. Any errors that occur during the
; execution of your script will be logged (typically, to your server's error log,
; but can be configured in several ways). Along with setting display_errors to off,
; this setup gives you the ability to fully understand what may have gone wrong,
; without exposing any sensitive information to remote users.
; - output_buffering = 4096 [Performance]
; Set a 4KB output buffer. Enabling output buffering typically results in less
; writes, and sometimes less packets sent on the wire, which can often lead to
; better performance. The gain this directive actually yields greatly depends
; on which Web server you're working with, and what kind of scripts you're using.
; - register_argc_argv = Off [Performance]
; Disables registration of the somewhat redundant $argv and $argc global
; variables.
; - magic_quotes_gpc = Off [Performance]
; Input data is no longer escaped with slashes so that it can be sent into
; SQL databases without further manipulation. Instead, you should use the
; function addslashes() on each input element you wish to send to a database.
; - variables_order = "GPCS" [Performance]
; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access
; environment variables, you can use getenv() instead.
; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
; By default, PHP surpresses errors of type E_NOTICE. These error messages
; are emitted for non-critical errors, but that could be a symptom of a bigger
; problem. Most notably, this will cause error messages about the use
; of uninitialized variables to be displayed.
; - allow_call_time_pass_reference = Off [Code cleanliness]
; It's not possible to decide to force a variable to be passed by reference
; when calling a function. The PHP 4 style to do this is by making the
; function require the relevant argument by reference.


I've been working with magic_quotes_gpc turned off for quite some time without any issues. This is basically a depreciated setting now for the reasons described in the above quote.

56
brash
Re: AMS 2.2 *again*
  • 2005/2/28 4:23

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Did a bit of hunting and found these differences between your environment and the PHP recommended php.ini settings for PHP 4.3.10 (in order you listed your settings on page 5 of this thread);


allow_call_time_pass_reference;
Recommended = Off
Yours = On

always_populate_raw_post_data
Recommended = On
Yours = Off

arg_separator.input
Recommended = ;&
Yours = &

arg_separator.output
Recommended = &
Yours = &

display_errors
Recommended = Off
Yours = On

html_errors
Recommended = Off
Yours = On

magic_quotes_gpc
Recommended = Off
Yours = On

max_input_time
Recommended = 60
Yours = -1

output_buffering
Recommended = 4096
Yours = 1

post_max_size
Recommended = 8M
Yours = 55M

register_argc_argv
Recommended = Off
Yours = On

register_globals
Recommended = Off
Yours = On



Keep in mind I might have missed ne or two here, and that the recommended values are coming from the Win32 dsitro. Should give you somewhere to start at least.

57
Cavan
Re: AMS 2.2 *again*
  • 2005/2/28 7:00

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Thanks for the information...Forgive my ignorance but I'm assuming my host will have to make these changes, correct?

58
Cavan
Re: AMS 2.2 *again*
  • 2005/2/28 17:23

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


brash:

My host has made the changes you suggested and maybe we're getting somewhere here...I'm no longer getting the word "error" at the top of the page when trying to submit news, but I still get the message "article saving failed" when only clicking on the submit button. I can still submit news if I preview the post but as I said, I can't when only clicking the submit button. Any other suggestions I can try before I uninstall XOOPS for good?

59
Cavan
Re: AMS 2.2 *again*
  • 2005/2/28 17:36

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


brash:

Just to ease my mind, please have a look at the AMS/submit.php to see if there's anything wrong or missing here:

<?php
// $Id: submit.php,v 1.13 2004/05/29 15:10:18 mithyt2 Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  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.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  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 //
//  ------------------------------------------------------------------------ //
include_once '../../mainfile.php';
include_once 
'class/class.newsstory.php';
include_once 
'class/class.newstopic.php';
include_once 
'class/class.sfiles.php';
include_once 
XOOPS_ROOT_PATH.'/class/uploader.php';
include_once 
XOOPS_ROOT_PATH.'/header.php';
if (
file_exists(XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/admin.php')) {
    include_once 
'language/'.$xoopsConfig['language'].'/admin.php';
}
else {
    include_once 
'language/english/admin.php';
}

$module_id $xoopsModule->getVar('mid');
$groups $xoopsUser $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;

$gperm_handler =& xoops_gethandler('groupperm');
$perm_itemid = isset($_POST['topic_id']) ? intval($_POST['topic_id']) : 0;

//If no access
if (!$gperm_handler->checkRight("ams_submit"$perm_itemid$groups$module_id)) {
    
redirect_header('index.php'3_NOPERM);
}

$op 'form';
foreach ( 
$_POST as $k => $v ) {
    ${
$k} = $v;
}

//If approve privileges
$approveprivilege 0;
if (
$xoopsUser && $gperm_handler->checkRight("ams_approve"$perm_itemid$groups$module_id)) {
    
$approveprivilege 1;
}

if ( isset(
$_POST['preview'] )) {
    
$op 'preview';
} elseif ( isset(
$_POST['post']) ) {
    
$op 'post';
}
elseif ( isset(
$_GET['op']) && isset($_GET['storyid'])) {
    if (
$approveprivilege && $_GET['op'] == 'edit') {
        
$op 'edit';
    }
    elseif (
$approveprivilege && $_GET['op'] == 'delete') {
        
$op 'delete';
    }
    else {
        
redirect_header("index.php"0_NOPERM);
        exit();
    }
    
$storyid intval($_GET['storyid']);
}
switch (
$op) {
    case 
"delete":
        if ( !empty( 
$ok ) )
        {
            if ( empty( 
$storyid ) )
            {
                
redirect_header'index.php?op=newarticle'2_AMS_AM_EMPTYNODELETE );
                exit();
            }
            
$story = new AmsStory$storyid );
            
$story -> delete();
            
$sfiles = new sFiles();    
            
$filesarr=Array();
            
$filesarr=$sfiles->getAllbyStory($storyid);
            if(
count($filesarr)>0
            {
                foreach (
$filesarr as $onefile
                {
                    
$onefile->delete();                
                }
            }            
            
xoops_comment_delete$xoopsModule -> getVar'mid' ), $storyid );
            
xoops_notification_deletebyitem$xoopsModule -> getVar'mid' ), 'story'$storyid );
            
redirect_header'index.php?op=newarticle'1_AMS_AM_DBUPDATED );
            exit();
        }
        else
        {
            
xoops_cp_header();
            echo 
"<h4>" _AMS_AM_CONFIG "</h4>";
            
xoops_confirm( array( 'op' => 'delete''storyid' => $storyid'ok' => ), 'submit.php'_AMS_AM_RUSUREDEL );
        }
        break;
        
    case 
'edit':
        if (!
$approveprivilege) {
            
redirect_header('index.php'0_NOPERM);
            break;
        }
        echo
"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class="odd">";
        echo 
"<h4>" _AMS_AM_EDITARTICLE "</h4>";
        
$story = new AmsStory$storyid );
        
$title $story -> title"Edit" );
        
$hometext $story -> hometext"Edit" );
        
$bodytext $story -> bodytext"Edit" );
        
$nohtml $story -> nohtml();
        
$nosmiley $story -> nosmiley();
        
$ihome $story -> ihome();
        
$notifypub 0;
        
$topicid $story -> topicid();
        
$approve 0;
        
$published $story->published();
        
$banner $story->banner;
        if (isset(
$published) && $published 0) {
            
$approve 1;
        }
        if ( 
$story -> published() != 0)
        {
            
$published $story -> published();
        }
        if ( 
$story -> expired() != 0)
        {
            
$expired $story -> expired();
        }
        else {
            
$expired 0;
        }
        
$edit true;
        
$type $story -> type();
        
$topicdisplay $story -> topicdisplay();
        
$topicalign $story -> topicalignfalse );
        
$isedit 1;
        
$audience $story -> audienceid;
        include 
"include/storyform.inc.php";
        echo
"</td></tr></table>";
        break;

case 
"preview":
    
$xt = new AmsTopic($xoopsDB->prefix("ams_topics"), $_POST['topic_id']);
    
$text explode("[extend]"$hometext);
    
$hometext $text[0];
    
$bodytext = isset($text[1]) ? $text[1] : "";
    if ( isset( 
$storyid ) ) {
        
$story = new AmsStory$storyid );
        
$published $story -> published();
        
$expired $story -> expired();
        
$edit true;
    }
    else {
        
$story = new AmsStory();
        
$published 0;
        
$expired 0;
        
$edit false;
    }
    
$topicid $topic_id;
    
$story->setTitle($title);
    
$story->setHometext($hometext);
    
$story->banner = isset($_POST['banner']) ? $_POST['banner'] : 0;
    if (
$approveprivilege) {
        
$story->setTopicdisplay($topicdisplay);
        
$story->setTopicalign($topicalign);
        
$story->setBodytext($bodytext);
        
$story->audienceid $_POST['audience'];
    }
    else {
        
$noname = isset($noname) ? intval($noname) : 0;
    }
    
$notifypub = isset($notifypub) ? intval($notifypub) : 0;

    if ( isset( 
$nosmiley ) && ( $nosmiley == || $nosmiley == ) ) {
        
$story -> setNosmiley$nosmiley );
    }
    else {
        
$nosmiley 0;
    }
    if (
$approveprivilege) {
        
$nohtml = isset($nohtml) ? intval($nohtml) : 0;
        
$story->setNohtml($nohtml);
        if (!isset(
$approve)) {
            
$approve 0;
        }
    } else {
        
$story->setNohtml 1;
    }

    
$title $story->title("InForm");
      
$hometext $story->hometext("InForm");
      if (
$approveprivilege) {
          
$bodytext $story->bodytext("InForm");
          
$ihome $story -> ihome();
      }

    
//Display post preview
    
$p_title $story->title("Preview");
    
$p_hometext $story->hometext("Preview");
    
$p_hometext .= $story->bodytext("Preview");
    if (isset(
$change)) {
        
$edit true;
    }
    
$topversion = ($story->revision == && $story->revisionminor == 0) ? 0;
    
$topicalign = isset($story->topicalign) ? 'align="'.$story->topicalign().'"' "";
    
$p_hometext = (($xt->topic_imgurl() != '') && $topicdisplay) ? '<img src="images/topics/'.$xt->topic_imgurl().'" '.$topicalign.' alt="" />'.$p_hometext $p_hometext;
    
themecenterposts($p_title$p_hometext);
    
$audience $story->audienceid;

    
//Display post edit form
    
include 'include/storyform.inc.php';
    break;

case 
"post":
    
$text explode("[extend]"$hometext);
    
$hometext $text[0];
    
$bodytext = isset($text[1]) ? $text[1] : "";
    
$nohtml_db 1;
    if ( 
is_object($xoopsUser) ) {
        
$uid $xoopsUser->getVar('uid');
        if ( 
$approveprivilege ) {
            
$nohtml_db = empty($nohtml) ? 1;
        }
    } else {
        
$uid 0;
    }
    if ( empty( 
$storyid ) ) {
        
$story = new AmsStory();
        
$story -> setUid$uid );
    }
    else {
        
$story = new AmsStory$storyid );
        
$story->setChange($change);
        if (
$newauthor && $approveprivilege) {
            
$story->setUid($uid);
        }
    }
    
$story->banner = isset($_POST['banner']) ? $_POST['banner'] : 0;
    
$story->setTitle($title);
    
$story->setHometext($hometext);
    if (
$bodytext) {
        
$story->setBodytext($bodytext);
    }
    else {
        
$story->setBodytext(' ');
    }
    
$story->setTopicId($topic_id);
    
$story->setHostname(xoops_getenv('REMOTE_ADDR'));
    
$story->setNohtml($nohtml_db);
    
$nosmiley = isset($nosmiley) ? intval($nosmiley) : 0;
    
$notifypub = isset($notifypub) ? intval($notifypub) : 0;
    
$story->setNosmiley($nosmiley);
    
$story->setNotifyPub($notifypub);
    
$story->setType($type);
    if (
$approveprivilege) {
        if ( !empty( 
$autodate )) {
            
$pubdate strtotime($publish_date['date']) + $publish_date['time'];
            
$offset $xoopsUser -> timezone() - $xoopsConfig['server_TZ'];
            
$pubdate $pubdate - ( $offset 3600 );
            
$story -> setPublished$pubdate );
        }
        if ( !empty( 
$autoexpdate )) {
            
$expiry_date strtotime($expiry_date['date']) + $expiry_date['time'];
            
$offset $xoopsUser -> timezone() - $xoopsConfig['server_TZ'];
            
$expiry_date $expiry_date - ( $offset 3600 );
            
$story -> setExpired$expiry_date );
        }
        
$story->setTopicdisplay($topicdisplay);
        
$story->setTopicalign($topicalign);
        
$story->setIhome($ihome);
        
$approve = isset($approve) ? $approve 0;
        if (!
$story->published()) {
            
$story->setPublished(time());
        }
        if (!
$story->expired()) {
            
$story->setExpired(0);
        }
        if(!
$approve) {
            
$story->setPublished(0);
        }
        
$story->audienceid intval($_POST['audience']);
    }
    elseif ( 
$xoopsModuleConfig['autoapprove'] == && !$approveprivilege) {
        
$approve 1;
        
$story->setPublished(time());
        
$story->setExpired(0);
        
$story->setTopicalign('R');
    }
    else {
        
$story->setPublished(0);
        
$approve 0;
        
$story -> setExpired);
    }
    
$story->setApproved($approve);
    
$result $story->store();
    
    if (
$result) {
        
// Notification
        
$notification_handler =& xoops_gethandler('notification');
        
$tags = array();
        
$tags['STORY_NAME'] = $title;
        
$tags['STORY_URL'] = XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/article.php?storyid=' $story->storyid();
        if ( 
$approve == 1) {
            
$notification_handler->triggerEvent('global'0'new_story'$tags);
        } else {
            
$tags['WAITINGSTORIES_URL'] = XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/admin/index.php?op=newarticle';
            
$notification_handler->triggerEvent('global'0'story_submit'$tags);
        }
        
// If notify checkbox is set, add subscription for approve
        
if ($notifypub) {
            include_once 
XOOPS_ROOT_PATH '/include/notification_constants.php';
            
$notification_handler->subscribe('story'$story->storyid(), 'approve'XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
        }
        
        
// Manage upload(s)
        
if(isset($_POST['delupload']) && count($_POST['delupload'])>)
        {
            foreach (
$_POST['delupload'] as $onefile)
            {
                
$sfiles = new sFiles($onefile);
                
$sfiles->delete();
            }
        }
        
        if(isset(
$_POST['xoops_upload_file'])&& isset($_FILES[$_POST['xoops_upload_file'][0]]))
        {
            
$fldname $_FILES[$_POST['xoops_upload_file'][0]];
            
$fldname = (get_magic_quotes_gpc()) ? stripslashes($fldname['name']) : $fldname['name'];
            if(
trim($fldname!=''))
            {
                
$sfiles = new sFiles();
                
$destname=$sfiles->createUploadName(XOOPS_UPLOAD_PATH,$fldname);
                
// Actually : Web pictures (png, gif, jpeg), zip, doc, xls, pdf, gtar, tar
                
$permittedtypes=array('image/gif''image/jpeg''image/pjpeg''image/x-png''image/png' ,'application/x-zip-compressed','application/msword''application/vnd.ms-excel''application/pdf''application/x-gtar''application/x-tar');
                
$uploader = new XoopsMediaUploaderXOOPS_UPLOAD_PATH$permittedtypes$xoopsModuleConfig['maxuploadsize']);
                
$uploader->setTargetFileName($destname);
                if (
$uploader->fetchMedia($_POST['xoops_upload_file'][0]))
                {
                    if (
$uploader->upload())
                    {
                        
$sfiles->setFileRealName($uploader->getMediaName());
                        
$sfiles->setStoryid($story->storyid());
                        
$sfiles->setMimetype($sfiles->giveMimetype(XOOPS_UPLOAD_PATH.'/'.$uploader->getMediaName()));
                        
$sfiles->setDownloadname($destname);
                        if(!
$sfiles->store())
                        {
                            echo 
_AMS_AM_UPLOAD_DBERROR_SAVE;
                        }
                    }
                    else
                    {
                        echo 
_AMS_AM_UPLOAD_ERROR;
                    }
                } else {
                    echo 
$uploader->getErrors();
                }
            }
        }
    }
    else {
        if (
$story->versionConflict == true) {
            include (
'include/versionconflict.inc.php');
            break;
        }
        else {
            
$message $story->renderErrors();
        }
    }
    if (!isset(
$message)) {
        
$message _AMS_NW_THANKS;
    }
    
redirect_header("index.php",2$message);
    break;
    
    case 
_AMS_NW_OVERRIDE:
       if (!
$approveprivilege || !$xoopsUser) {
           
redirect_header('index.php'3_NOPERM);
       }
       
$hiddens = array('bodytext' => $_POST['bodytext'], 
                        
'hometext' => $_POST['hometext'],
                        
'storyid' => $_POST['storyid'],
                        
'change' => $_POST['change'],
                        
'op' => 'override_ok');
       
$story = new AmsStory($_POST['storyid']);
       
$story->setChange($_POST['change']);
       
       
$message "";
       
$story->calculateVersion();
       
$message .= _AMS_NW_TRYINGTOSAVE." ".$story->version.".".$story->revision.".".$story->revisionminor." <br />";
       
$higher_versions $story->getVersions(true);
       if (
count($higher_versions) > 0) {
           
$message .= sprintf(_AMS_NW_VERSIONSEXISTcount($higher_versions));
           
$message .= "<br />";
           foreach (
$higher_versions as $key => $version) {
               
$message .= $version['version'].".".$version['revision'].".".$version['revisionminor']."<br />";
           }
       }
       
$message .= _AMS_NW_AREYOUSUREOVERRIDE;
       
xoops_confirm($hiddens'submit.php'$message_YES);
       break;
    
    case 
'override_ok':
       if (!
$approveprivilege || !$xoopsUser) {
           
redirect_header('index.php'3_NOPERM);
       }
       
$story = new AmsStory($_POST['storyid']);
       
$story->setChange($_POST['change']);
       
$story->setUid($xoopsUser->getVar('uid'));
       
$story->setHometext($_POST['hometext']);
       
$story->setBodytext($_POST['bodytext']);
       
$story->calculateVersion();
       if (
$story->overrideVersion()) {
           
$message sprintf(_AMS_NW_VERSIONUPDATED$story->version.".".$story->revision.".".$story->revisionminor);
       }
       else {
           
$message $story->renderErrors();
       }
       
redirect_header('article.php?storyid='.$story->storyid3$message);
       break;
       
       
    case 
_AMS_NW_FINDVERSION:
       if (!
$approveprivilege || !$xoopsUser) {
           
redirect_header('index.php'3_NOPERM);
           exit();
       }
       
$story = new AmsStory($_POST['storyid']);
       
$story->setUid($xoopsUser->getVar('uid'));
       
$story->setHometext($_POST['hometext']);
       
$story->setBodytext($_POST['bodytext']);
       
$story->setChange($_POST['change']);
       if (
$story->calculateVersion(true)) {
           if (
$story->updateVersion()) {
               
$message sprintf(_AMS_NW_VERSIONUPDATED$story->version.".".$story->revision.".".$story->revisionminor);
               
//redirect_header('article.php?storyid='.$story->storyid(), 3, $message);
               //exit();
           
}
           else {
               
$message $story->renderErrors();
           }
       }
       else {
           
$message $story->renderErrors();
       }
       
redirect_header('article.php?storyid='.$story->storyid(), 3$message);
       break;

    case 
'form':
    default:
        
$title '';
        
$hometext '';
        
$noname 0;
        
$nohtml 0;
        
$nosmiley 0;
        
$notifypub 1;
        
$topicid 0;
        if (
$approveprivilege) {
            
$topicdisplay 0;
            
$topicalign 'R';
            
$ihome 0;
            
$bodytext ' ';
            
$approve 1;
            
$autodate '';
            
$expired 0;
            
$published 0;
            
$audience 0;
        }
        
$banner "";
        
$edit false;
        include 
'include/storyform.inc.php';
        break;
}
include 
XOOPS_ROOT_PATH.'/footer.php';
?>


Thank you.

60
Cavan
Re: AMS 2.2 *again*
  • 2005/2/28 18:48

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


I just noticed another 'bizarre' problem (?) with AMS:

When previewing a post, the word "extend" (with brackets around it) now appears immediately after the last word (no space between the last bracket and last letter of last word), like this:

[extend]

Any idea why that's appearing now?

Login

Who's Online

209 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 209


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