1
steinj14
Search by Keyword Functionality
  • 2006/11/7 19:04

  • steinj14

  • Just popping in

  • Posts: 5

  • Since: 2005/2/10


Is it normal behavior for the search by keyword to return expired news items in the results? I'm using the core search and news module. What's the use in setting an expiration date on a news article if that's the case?
Thanks,
Joan



2
steinj14
Why does search display expired articles? DBL Post
  • 2006/10/26 17:59

  • steinj14

  • Just popping in

  • Posts: 5

  • Since: 2005/2/10


Is there a setting somewhere to prevent the search results from displaying expired news articles (module newbb)? If not, is there a hack for the search php?



3
steinj14
Re: How to change or hack default xoops editor?
  • 2006/3/15 21:13

  • steinj14

  • Just popping in

  • Posts: 5

  • Since: 2005/2/10


Following up from my original post - I think I finally found the files to hack. The hack I implemented keeps all the XOOPS editor buttons visible if you are logged in as "admin". Otherwise it strips out all the buttons and just displays the textarea box.

The file
{XOOPSBASE}/class/xoopsform/formdhtmltextarea.php
affects the News item submission form in the News module, and the Post Comment and Reply forms in the xcGallery module.
The file
{XOOPSBASE}/include/xoopscodes.php
affects the Upload Picture form in the xcGallery module and the Post form in the Forum module.

It seems very strange to me that the modules (core and add-on) are not consistent with how they implement the XOOPS default editor. I would think I should have only had to hack one file, and that would be used by all modules.

Here's the hack for function "xoopsCodeTarea" in xoopscodes.php
----------------------------------------------------
function xoopsCodeTarea($textarea_id$cols=60$rows=15$suffix=null)
{
    
$hiddentext = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText';
    
//Hack for url, email ...., the anchor is for having a link on [_More...]
        
    //HACK: UNLESS USER IS ADMIN, COMMENT OUT THE SPECIAL XOOPSCODE DHTML BUTTONS BECAUSE MAKES PAGE TOO 
    //   CLUTTERED AND TOO COMPLICATED FOR USERS WHEN ADDING COMMENTS, FORUMS, PICTURES, ETC. (3/13/06 JMS).
    
    //GET THE USER ID OF THE LOGGED IN USER - ADDED THIS SECTION 3/13/06 JMS.
    
global $xoopsUser;
    if (
$xoopsUser) {
      
//User is logged in, display welcome message
      
$uname $xoopsUser->getVar('uname');
      
//$upw = $xoopsUser->getVar('pass');
      
$uid $xoopsUser->getVar('uid');
    }
    
    
// ADMIN USER ID IS 1.  ADDED THIS USER CHECK IF/ELSE CODE 3/13/06 JMS.
    
if ($uid == 1) {
             ...
the rest of the function code goes here...

    
// IF USER IS NOT ADMIN, JUST SHOW TEXT AREA.
    
} else {    
        echo 
"<br />n";
        
//Hack smilies move for bold, italic ...
        
$areacontent = isset( $GLOBALS[$textarea_id] ) ? $GLOBALS[$textarea_id] : '';
            
        echo 
"<br /><textarea id='".$textarea_id."' name='".$textarea_id."' cols='$cols' rows='$rows'>".$areacontent."</textarea><br />n";
        
//Fin du hack    
    
}    

}



Use the same structure for the "render" function in formdhtmltextarea.php - the else code is listed below:
----------------------------------------------------
// IF USER IS NOT ADMIN, JUST SHOW TEXT AREA.    
        
} else {
            
$ret "<br /><textarea id='".$this->getName()."' name='".$this->getName()."' onselect="xoopsSavePosition('".$this->getName()."');" onclick="xoopsSavePosition('".$this->getName()."');" onkeyup="xoopsSavePosition('".$this->getName()."');" cols='".$this->getCols()."' rows='".$this->getRows()."'".$this->getExtra().">".$this->getValue()."</textarea><br />n";
            
$ret .= $this->_renderSmileys();
            return 
$ret;        
        }



4
steinj14
How to change or hack default xoops editor?
  • 2006/3/11 3:35

  • steinj14

  • Just popping in

  • Posts: 5

  • Since: 2005/2/10


I want to change from the DHTML editor (at least for everyone but admin) so I don't have all the buttons showing (e.g., url, email, image, image manager, etc.). I noticed on this form you have an option DHTML or Compact for the form type. Is there a setting somewhere in the configuration that will make the default Compact instead of DHTML? If it's not a setting, what template or php script do I need to hack? I know this shouldn't be hard, but I've been digging in the forums and faqs and code for two days without luck. Thanks in advance!



5
steinj14
another admin login problem
  • 2005/9/28 17:52

  • steinj14

  • Just popping in

  • Posts: 5

  • Since: 2005/2/10


I installed version 2.0.13 via Fantastico and can login as admin. When I click on Administration, the screen "This is your first time to enter the administration section. Press the button below to proceed." opens. But when I click on the "Submit" button, it doesn't take me to the Administration menu. Instead it returns me to the "This is your first time to enter the administration section. Press the button below to proceed." page. I made the change to the mainfile.php page as indicated in another post (prefaced the virtual dir with www), but that had no effect. What am I missing? Thanks - Joan




TopTop



Login

Who's Online

241 user(s) are online (167 user(s) are browsing Support Forums)


Members: 0


Guests: 241


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