xoops forums

Forum Index


Board index » All Posts (fragttdg)




fragttdg

Just popping in
Posted on: 2008/4/21 4:48
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#1

Re: Using mod_rewrite to remove "modules" from URL's?

This is not a isolated question.

sometimes, code like "modules/"._MODULE_DIR_NAME is hard coded in php or template files, this might be presented as link in frontend, and it will take you to the originall links again.
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2007/1/31 9:02
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#2

Re: Converting from :80 to :8080 for Existing Site?

Maybe you can use apache mod_rewrite, config .htaccess or httpd.conf, like:

RewriteEngine On 

RewriteCond 
%{HTTP_HOST} ^www.website.com
RewriteRule 
(.*) http://www.website.com:8080/$1 [R=301,L]


Good Luck.
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2007/1/16 4:30
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#3

Re: any editor can show smilies at the bottom of page needed

I wrote a simple textarea under class/xoopsform/ and have been using it throughout my site. FYI

<?php
if (!defined('XOOPS_ROOT_PATH')) {
    die(
"XOOPS root path not defined");
}
include_once(
XOOPS_ROOT_PATH.'/include/xoopscodes.php');

class 
XoopsFormSimpleTextArea extends XoopsFormElement {
    
/**
     * number of columns
     * @var    int 
     * @access  private
     */
    
var $_cols;

    
/**
     * number of rows
     * @var    int 
     * @access  private
     */
    
var $_rows;

    
/**
     * initial content
     * @var    string  
     * @access  private
     */
    
var $_value;

    
/**
     * Constuctor
     * 
     * @param    string  $caption    caption
     * @param    string  $name       name
     * @param    string  $value      initial content
     * @param    int     $rows       number of rows
     * @param    int     $cols       number of columns   
     */
    
function XoopsFormSimpleTextArea($caption$name$value=""$rows=5$cols=50$id ""){
        
$this->setCaption($caption);
        
$this->setName($name);
        
$this->_rows intval($rows);
        
$this->_cols intval($cols);
        
$this->setValue($value);
        
$this->setId($id);
    }

    
/**
     * get number of rows
     * 
     * @return    int
     */
    
function getRows(){
        return 
$this->_rows;
    }

    
/**
     * Get number of columns
     * 
     * @return    int
     */
    
function getCols(){
        return 
$this->_cols;
    }

    
/**
     * Get initial content
     * 
     * @return    string
     */
    
function getValue(){
        return 
$this->_value;
    }

    
/**
     * Set initial content
     * 
     * @param    $value    string
     */
    
function setValue($value){
        
$this->_value $value;
    }

    
/**
     * prepare HTML for output
     * 
     * @return    sting HTML
     */
    
function render(){
        return 
"<textarea name='".$this->getName()."' id='".$this->getId()."' rows='".$this->getRows()."' cols='".$this->getCols()."'".$this->getExtra().">".$this->getValue()."</textarea>".get_xoopsSmilies($this->getId());
    }
}
?>
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2007/1/16 4:19
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#4

Re: How can I create read-only fields in user profile?

in XOOPS 2.2.x, this is managed by profile params in xoops_version.php,

for example:

$modversion['profile']['field'][] = array(
'name' => 'vip',
'title' => 'USER VIP',
'description' => '',
'type' => 'textbox',
'valuetype' => XOBJ_DTYPE_INT,
'maxlength' => 3,
'default' => 0,
'show' => 1,
'edit' => 0,
'required' => 0,
'config' => 1,
);
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2007/1/16 4:05
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#5

Re: Adding non mod link to main menu

you can add some hard-code into the main menu block.

find b_system_main_show in modules/system/blocks/system_block.php
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2006/12/12 3:15
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#6

Re: URL Rewriting for XOOPS - Tips and Tricks

Quote:

Dona_Brasil wrote:
Cool, how did you rewrite the CBB url's??


It's very painful, I modified all the hard code like "modules/newbb", '/modules/' . $xoopsModule->getVar('dirname') in CBB codes, templates. I hope newly version could have this enhancement enabled.

Also, I think it would be better that in CBB, only "modules/newbb" or only '/modules/' . $xoopsModule->getVar('dirname') be used, not both used mixed.
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2006/12/7 5:42
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#7

Re: PHP Script Block Question

dont forget to include mainfile.php;

if your senario is in a function, be sure to declare

"global $xoopsDB;"
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2006/12/7 5:33
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#8

Re: URL Rewriting for XOOPS - Tips and Tricks

Valuable input! thanks for share.

I've been doing rewriting things on my own site too. Efforts on apache config or htaccess just works on controlling the URL entrance of each module. Many modules, links inside are hard-coded. You might need to crack the modules in many places.

Modules in my site are using rewrite.

LINK below is my CBB MODULE:
http://www.xiubei.com/forums/index.php
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2006/5/29 8:20
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#9

NEW SITE BASED ON XOOPS.

Finally, I'v almost finished this site:
http://www.yiyya.com (Chinese site)

User can build up their own user-website in this XOOPS based site.

Xoops is a fabulous foundation for the whole site, it makes everything easy and well under control.

Please leave your comment here. many thanks indeed.
Xoops Based site - http://www.xiubei.com


fragttdg

Just popping in
Posted on: 2006/5/9 9:26
fragttdg
fragttdg (Show more)
Just popping in
Posts: 34
Since: 2004/6/13
#10

upgrade class.phpmailer.php

Hi all, just want to know would there be any imcompatibility if I manually replace my current version (1.6.5) phpmailer in XOOPS to the newest 1.7.3 phpmailer?

Thanks.
Xoops Based site - http://www.xiubei.com



TopTop
(1) 2 3 4 »