61
trspice
How can I make 'Liaise' interpret HTML for the form introduction?
  • 2007/12/17 0:24

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I use the TinyEditor module as global XOOPS editor and when I add text to Liaise's Form description and Form introduction text areas, it displays with the HTML tags.

How can I fix that?
There's nothing but science....
The Reggae Album



62
trspice
Show Xoops redirect page messages in theme - Xoops-magazine.com
  • 2007/12/17 0:09

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


This hack by GI Joe shows the Xoops_redirect page messages in block in your theme instead of system_redirect.html. It also helps to speed up server execution time.

Quote:

Theme.html
Insert this 8 lines into the top of your theme.html


<{php}>
if( ! empty( $_SESSION['redirect_message'] ) ) {
if( empty( $this->_tpl_vars['xoops_lblocks'] ) ) $this->_tpl_vars['xoops_lblocks'] = array() ;
array_unshift( $this->_tpl_vars['xoops_lblocks'] , array( 'title' => 'Message' , 'content' => $_SESSION['redirect_message'] , 'weight' => 0 ) ) ;
$this->_tpl_vars['xoops_showlblock'] = 1 ;
unset( $_SESSION['redirect_message'] ) ;
}
<{/php}>


If you use XOOPS 2.2.x, also insert them into themeadmin.html


------------------------------------------------

If using XOOPS 2.0.13a-JP.
Edit line 423 in include/functions.php

$xoopsTpl->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xoopsTpl->assign('message', $message);
$xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
$GLOBALS['xoopsModuleUpdate'] = 1;

// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end


$xoopsTpl->display('db:system_redirect.html');
exit();
} else {
$url = preg_replace("/& amp;/i", '&', htmlspecialchars($url, ENT_QUOTES));

// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end


echo '
<html>
<head>

line 128 in include/cp_functions.php

<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='2%' valign='top' class='bg5' background='".XOOPS_URL."/modules/system/images/bg_menu.gif' align='center'></td>
<td width='15%' valign='top' class='bg5' align='center'><img src='".XOOPS_URL."/modules/system/images/menu.gif' /><br />
<table border='0' cellpadding='4' cellspacing='0' width='100%'>";

// start
if( ! empty( $_SESSION['redirect_message'] ) ) {
echo "<tr><td>".htmlspecialchars($_SESSION['redirect_message'],ENT_QUOTES)."</td></tr>\n" ;
unset( $_SESSION['redirect_message'] ) ;
}
// end


foreach ( $admin_mids as $adm ) {
if ( !empty($xoops_admin_menu_ft[$adm]) ) {
echo "<tr><td align='center'>".$xoops_admin_menu_ft[$adm]."</td></tr>";
}
}

--------------------------------------------------

If using XOOPS 2.0.x
line 404 in include/functions.php


$xoopsTpl->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xoopsTpl->assign('message', $message);
$xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));

// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end


$xoopsTpl->display('db:system_redirect.html');
exit();
}



line 141 in include/cp_functions.php

<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='2%' valign='top' class='bg5' background='".XOOPS_URL."/m
odules/system/images/bg_menu.gif' align='center'></td>
<td width='15%' valign='top' class='bg5' align='center'><img src='".
XOOPS_URL."/modules/system/images/menu.gif' /><br />
<table border='0' cellpadding='4' cellspacing='0' width='100%'>";

// start
if( ! empty( $_SESSION['redirect_message'] ) ) {
echo "<tr><td>".htmlspecialchars($_SESSION['redirect_message'],ENT_QUOTES)."</td></tr>\n" ;
unset( $_SESSION['redirect_message'] ) ;
}
// end


foreach ( array_keys($xoops_admin_menu_ft) as $adm ) {
if ( in_array($adm, $admin_mids) ) {
echo "<tr><td align='center'>".$xoops_admin_menu_ft[$adm]."</td>
</tr>";
}
}


-------------------------------------------------

If using XOOPS 2.2.3 final
line 424 in include/functions.php


$xTheme->tplEngine->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xTheme->tplEngine->assign('message', $message);
$xTheme->tplEngine->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
$xTheme->tplEngine->assign('xoops_module_header', '<meta http-equiv="Refresh" content="2; url='.$url.'" />');
$xoopsOption['template_main'] = 'system_redirect.html';

// start
if( ! headers_sent() ) {
$_SESSION['redirect_message'] = $message ;
header( "Location: ".strtr(preg_replace('/[&]amp;/i','&',$url),"\r\n\0"," ") ) ;
exit ;
}
// end


include XOOPS_ROOT_PATH."/footer.php";
exit();
}


I wanted the message to display in the center so I used
Quote:

<{php}>
if( ! empty( $_SESSION['redirect_message'] ) ) {
if( empty( $this->_tpl_vars['xoops_ccblocks'] ) ) $this->_tpl_vars['xoops_ccblocks'] = array() ;
array_unshift( $this->_tpl_vars['xoops_ccblocks'] , array( 'title' => 'Message' , 'content' => $_SESSION['redirect_message'] , 'weight' => 0 ) ) ;
$this->_tpl_vars['xoops_showcblock'] = 1 ;
unset( $_SESSION['redirect_message'] ) ;
}
<{/php}>


What I can't figure to do is add a style to the message like <span style="background: #ff0000">. I'd like to make it stand out with red. Can anyone suggest?

EDIT: Apparently this hack was originall done by Peak Xoops
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=70
There's nothing but science....
The Reggae Album



63
trspice
Re: How can I re-locate the Submit link for news module.
  • 2007/12/10 19:45

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


trabis, it works perfectly... thanks. I should have given thought to applying it to the news/index.php.
There's nothing but science....
The Reggae Album



64
trspice
Re: How can I re-locate the Submit link for news module.
  • 2007/12/8 23:52

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


trabis the method you suggest is exactly what I need however when I apply it I get the following error
Quote:

Fatal error: Call to a member function getVar() on a non-object in /home/icinc/public_html/index.php on line 48


The strange thing is that all subsequent pages work fine.

This is how my index.php file is written
<?php
include "mainfile.php";

//check if start page is defined
if ( isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--" ) {
    
header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/');
    exit();
} else {
    
$xoopsOption['show_cblock'] =1;
    include 
"header.php";
    
$xoopsTpl->assign'is_homepage',true);
    
    
$groups is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS
    
$gperm_handler =& xoops_gethandler('groupperm'); 
    if (
$gperm_handler->checkRight('news_submit'0$groups$xoopsModule->getVar('mid'))) { 
    
$perm 1
    } else { 
    
$perm 0
    } 
    
$xoopsTpl->assign('perm'$perm);

    include 
"footer.php";
}
?>
There's nothing but science....
The Reggae Album



65
trspice
How can I re-locate the Submit link for news module.
  • 2007/12/5 22:38

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I don't use the XOOPS main menu block and I want the News module submit link to display at the top of the news pages and visible only for each group permitted to submit(just as it functions now in the main menu).

I searched the site for an hour and didn't find any post with a solution. Does anyone have a solution for this?
There's nothing but science....
The Reggae Album



66
trspice
Re: Seeking a shopping cart module..
  • 2007/10/10 5:01

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Thanks
There's nothing but science....
The Reggae Album



67
trspice
Seeking a shopping cart module..
  • 2007/10/9 20:36

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Does anyone know of a shopping cart module? I looked at Kshop but it lacked payment and shipping plugins and no means of placing checkout under an SSL.
There's nothing but science....
The Reggae Album



68
trspice
Re: Bye Xoops Hello Joomla
  • 2007/9/29 21:59

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


goatboy
I agree with you. Even if there was no issue, if you move to another cms just do it without announcing here. This need only be known to those associated with your site.
There's nothing but science....
The Reggae Album



69
trspice
Re: Need a hack to use HTML editor for Xcgal
  • 2007/9/26 22:28

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


This is the keep alive post...
There's nothing but science....
The Reggae Album



70
trspice
Re: After Install - No Admin Access
  • 2007/9/26 22:27

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


This seems more like a database issue than file permission. Check user table of your DB to see if the admin was added during setup.

If your localhost is just for testing you may find either ApacheTriadhttp://apache2triad.net/
or Xamp
http://www.apachefriends.org/en/xampp-windows.html
much less effort.
There's nothing but science....
The Reggae Album




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 19 »



Login

Who's Online

193 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 193


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