61
JulioNC
Re: jinzora module
  • 2007/5/14 16:43

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


I found two alternatives for Jinzora, both are a menace for Jinzora

Ampache
http://ampache.org/
Quote:

Ampache is a Web-based Audio file manager. It is implemented with MySQL, and PHP. It allows you to view, edit, and play your audio files via the web. It has support for playlists, artist and album views, album art, random play, playback via Http/On the Fly Transcoding and Downsampling


mp3act
http://www.mp3act.net/
Quote:

The mp3act digital music system is designed to be a central location for your digital music collection and a means to easily organize and listen to your digital media through your stereo, over a local network, or anywhere in the world.



62
JulioNC
Re: jinzora module
  • 2007/5/14 16:38

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


Who is blackdeath_csmc?

See "Xjinzora Module for Xoops"
http://xoops.cvs.sourceforge.net/xoops/modules/xjinzora/

He started jinzora module for XOOPS two years ago, but this module never released announcement?
Why? I don't know, but this jinzora module doesn't work with xoops....



63
JulioNC
Re: News 1.53: problems with WYSIWYG editor
  • 2007/3/28 15:28

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


Hi!

News 1.51 with FCKeditor

FCKeditor and Koivi available!

XOOPS_ROOT_PATH/modules/news/functions.php
<?php

// $Id: functions.php,v 1.5 2004/09/02 17:04:08 hthouzard 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 //

//  ------------------------------------------------------------------------ //

if (!defined('XOOPS_ROOT_PATH')) {

    die(
'XOOPS root path not defined');

}



/**

 * Returns a module's option

 *

 * Return's a module's option (for the news module)

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 * @param string $option    module option's name

 */

function news_getmoduleoption($option$repmodule='news')

{

    global 
$xoopsModuleConfig$xoopsModule;

    static 
$tbloptions= Array();

    if(
is_array($tbloptions) && array_key_exists($option,$tbloptions)) {

        return 
$tbloptions[$option];

    }



    
$retval false;

    if (isset(
$xoopsModuleConfig) && (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $repmodule && $xoopsModule->getVar('isactive'))) {

        if(isset(
$xoopsModuleConfig[$option])) {

            
$retval$xoopsModuleConfig[$option];

        }

    } else {

        
$module_handler =& xoops_gethandler('module');

        
$module =& $module_handler->getByDirname($repmodule);

        
$config_handler =& xoops_gethandler('config');

        if (
$module) {

            
$moduleConfig =& $config_handler->getConfigsByCat(0$module->getVar('mid'));

            if(isset(
$moduleConfig[$option])) {

                
$retval$moduleConfig[$option];

            }

        }

    }

    
$tbloptions[$option]=$retval;

    return 
$retval;

}





/**

 * Updates rating data in item table for a given item

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_updaterating($storyid)

{

    global 
$xoopsDB;

    
$query 'SELECT rating FROM '.$xoopsDB->prefix('stories_votedata').' WHERE storyid = '.$storyid;

    
$voteresult $xoopsDB->query($query);

    
$votesDB $xoopsDB->getRowsNum($voteresult);

    
$totalrating 0;

    while(list(
$rating)=$xoopsDB->fetchRow($voteresult)){

        
$totalrating += $rating;

    }

    
$finalrating $totalrating/$votesDB;

    
$finalrating number_format($finalrating4);

    
$sql sprintf("UPDATE %s SET rating = %u, votes = %u WHERE storyid = %u"$xoopsDB->prefix('stories'), $finalrating$votesDB$storyid);

    
$xoopsDB->queryF($sql);

}







/**

 * Internal function for permissions

 *

 * Returns a list of all the permitted topics Ids for the current user

 *

 * @return array $topics    Permitted topics Ids

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_MygetItemIds($permtype='news_view')

{

    global 
$xoopsUser;

    static 
$tblperms = array();

    if(
is_array($tblperms) && array_key_exists($permtype,$tblperms)) {

        return 
$tblperms[$permtype];

    }



       
$module_handler =& xoops_gethandler('module');

       
$newsModule =& $module_handler->getByDirname('news');

       
$groups is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;

       
$gperm_handler =& xoops_gethandler('groupperm');

       
$topics $gperm_handler->getItemIds($permtype$groups$newsModule->getVar('mid'));

       
$tblperms[$permtype] = $topics;

    return 
$topics;

}



function 
news_html2text($document)

{

    
// PHP Manual:: function preg_replace

    // $document should contain an HTML document.

    // This will remove HTML tags, javascript sections

    // and white space. It will also convert some

    // common HTML entities to their text equivalent.



    
$search = array ("'<script[^>]*?>.*?</script>'si",  // Strip out javascript

                     
"'<[/!]*?[^<>]*?>'si",          // Strip out HTML tags

                     
"'([rn])[s]+'",                // Strip out white space

                     
"'&(quot|#34);'i",                // Replace HTML entities

                     
"'&(amp|#38);'i",

                     
"'&(lt|#60);'i",

                     
"'&(gt|#62);'i",

                     
"'&(nbsp|#160);'i",

                     
"'&(iexcl|#161);'i",

                     
"'&(cent|#162);'i",

                     
"'&(pound|#163);'i",

                     
"'&(copy|#169);'i",

                     
"'&#(d+);'e");                    // evaluate as php



    
$replace = array ("",

                     
"",

                     
"\1",

                     
""",

                     "
&",

                     "
<",

                     "
>",

                     " ",

                     chr(161),

                     chr(162),

                     chr(163),

                     chr(169),

                     "
chr(\1)");



    
$text = preg_replace($search$replace$document);

    return 
$text;

}





/**

 * Retreive an editor according to the module's option "
form_options"

 */

function &news_getWysiwygForm(
$caption$name$value = '', $width = '100%', $height = '400px', $supplemental='')

{

    
$editor = false;

    
$x22=false;

    
$xv=str_replace('XOOPS ','',XOOPS_VERSION);

    if(substr(
$xv,2,1)=='2') {

        
$x22=true;

    }

    
$editor_configs=array();

    
$editor_configs['name'] =$name;

    
$editor_configs['value'] = $value;

    
$editor_configs['rows'] = 35;

    
$editor_configs['cols'] = 60;

    
$editor_configs['width'] = '100%';

    
$editor_configs['height'] = '400px';





    switch(strtolower(news_getmoduleoption('form_options'))) {

        case 'spaw':

            if(!
$x22) {

                if (is_readable(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php'))    {

                    include_once(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php');

                    
$editor = new XoopsFormSpaw($caption$name$value);

                }

            } else {

                
$editor = new XoopsFormEditor($caption, 'spaw', $editor_configs);

            }

            break;



        case 'fck':

            if(!
$x22) {

                if ( is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/FCKeditor/formfckeditor.php'))    {

                    include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/FCKeditor/formfckeditor.php');

                    
$editor = new XoopsFormFckeditor($caption$name$value);

                }

            } else {

                
$editor = new XoopsFormEditor($caption, 'fckeditor', $editor_configs);

            }

            break;



        case 'htmlarea':

            if(!
$x22) {

                if ( is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php'))    {

                    include_once(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php');

                    
$editor = new XoopsFormHtmlarea($caption$name$value);

                }

            } else {

                
$editor = new XoopsFormEditor($caption, 'htmlarea', $editor_configs);

            }

            break;



        case 'dhtml':

            if(!
$x22) {

                
$editor = new XoopsFormDhtmlTextArea($caption$name$value, 10, 50, $supplemental);

            } else {

                
$editor = new XoopsFormEditor($caption, 'dhtmltextarea', $editor_configs);

            }

            break;



        case 'textarea':

            
$editor = new XoopsFormTextArea($caption$name$value);

            break;



        case 'tinyeditor':

            if ( is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinyeditortextarea.php')) {

                include_once XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinyeditortextarea.php';

                
$editor = new XoopsFormTinyeditorTextArea(array('caption'=> $caption, 'name'=>$name, 'value'=>$value, 'width'=>'100%', 'height'=>'400px'));

            }

            break;



        case 'koivi':

            if(!
$x22) {

                if ( is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/koivi/formwysiwygtextarea.php')) {

                    include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/koivi/formwysiwygtextarea.php');

                    
$editor = new XoopsFormWysiwygTextArea($caption$name$value, '100%', '450px', '');

                }

            } else {

                
$editor = new XoopsFormEditor($caption, 'koivi', $editor_configs);

            }

            break;

        }

        return 
$editor;

}



/**

 * Internal function

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function DublinQuotes(
$text) {

    return str_replace("""
' ',$text);

}





/**

 * Creates all the meta datas :

 * - For Mozilla/Netscape and Opera the site navigation's bar

 * - The Dublin's Core Metadata

 * - The link for Firefox 2 micro summaries

 * - The meta keywords

 * - The meta description

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_CreateMetaDatas($story null)

{

    global 
$xoopsConfig$xoTheme$xoopsTpl;

    
$content '';

    
$myts =& MyTextSanitizer::getInstance();

    include_once 
XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php';



    
/**

     * Firefox and Opera Navigation's Bar

     */

    
if(news_getmoduleoption('sitenavbar')) {

        
$content .= sprintf("<link rel="Home" title="%s" href="%s/" />n",$xoopsConfig['sitename'],XOOPS_URL);

        
$content .= sprintf("<link rel="Contents" href="%s" />n",XOOPS_URL.'/modules/news/index.php');

        
$content .= sprintf("<link rel="Search" href="%s" />n",XOOPS_URL.'/search.php');

        
$content .= sprintf("<link rel="Glossary" href="%s" />n",XOOPS_URL.'/modules/news/archive.php');

        
$content .= sprintf("<link rel="%s" href="%s" />n",$myts->htmlSpecialChars(_NW_SUBMITNEWS),XOOPS_URL.'/modules/news/submit.php');

        
$content .= sprintf("<link rel="alternate" type="application/rss+xml" title="%s" href="%s/" />n",$xoopsConfig['sitename'],XOOPS_URL.'/backend.php');



        
// Create chapters

        
include_once XOOPS_ROOT_PATH.'/class/tree.php';

        include_once 
XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php';

        
$xt = new NewsTopic();

        
$allTopics $xt->getAllTopics(news_getmoduleoption('restrictindex'));

        
$topic_tree = new XoopsObjectTree($allTopics'topic_id''topic_pid');

        
$topics_arr $topic_tree->getAllChild(0);

        foreach (
$topics_arr as $onetopic) {

            
$content .= sprintf("<link rel="Chapter" title="%s" href="%s" />n",$onetopic->topic_title(),XOOPS_URL.'/modules/news/index.php?storytopic='.$onetopic->topic_id());

        }

    }



    
/**

     * Meta Keywords and Description

      * If you have set this module's option to 'yes' and if the information was entered, then they are rendered in the page else they are computed

      */

    
$meta_keywords '';

    if(isset(
$story) && is_object($story)) {

        if(
xoops_trim($story->keywords()) != '') {

            
$meta_keywords $story->keywords();

        } else {

            
$meta_keywords news_createmeta_keywords($story->hometext().' '.$story->bodytext());

        }

        if(
xoops_trim($story->description())!='') {

            
$meta_description $story->description();

        } else {

            
$meta_description strip_tags($story->title());

        }

        if(isset(
$xoTheme) && is_object($xoTheme)) {

            
$xoTheme->addMeta'meta''keywords'$meta_keywords);

            
$xoTheme->addMeta'meta''description'$meta_description);

        } elseif(isset(
$xoopsTpl) && is_object($xoopsTpl)) {    // Compatibility for old XOOPS versions

            
$xoopsTpl->assign('xoops_meta_keywords'$meta_keywords);

            
$xoopsTpl->assign('xoops_meta_description'$meta_description);

        }

    }



    
/**

     * Dublin Core's meta datas

     */

    
if(news_getmoduleoption('dublincore') && isset($story) && is_object($story)) {

        
$config_handler =& xoops_gethandler('config');

        
$xoopsConfigMetaFooter =& $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER);

        
$content .= '<meta name="DC.Title" content="'.DublinQuotes($story->title())."" />n";

        
$content .= '<meta name="DC.Creator" content="'.DublinQuotes($story->uname())."" />n";

        $content .= '
<meta name="DC.Subject" content="'.DublinQuotes($meta_keywords)."" />n";

        
$content .= '<meta name="DC.Description" content="'.DublinQuotes($story->title())."" />n";

        
$content .= '<meta name="DC.Publisher" content="'.DublinQuotes($xoopsConfig['sitename'])."" />n";

        $content .= '
<meta name="DC.Date.created" scheme="W3CDTF" content="'.date('Y-m-d',$story->created)."" />n";

        
$content .= '<meta name="DC.Date.issued" scheme="W3CDTF" content="'.date('Y-m-d',$story->published)."" />n";

        
$content .= '<meta name="DC.Identifier" content="'.XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid()."" />n";

        $content .= '
<meta name="DC.Source" content="'.XOOPS_URL."" />n";

        
$content .= '<meta name="DC.Language" content="'._LANGCODE."" />n";

        
$content .= '<meta name="DC.Relation.isReferencedBy" content="'.XOOPS_URL.'/modules/news/index.php?storytopic='.$story->topicid()."" />n";

        if(isset($xoopsConfigMetaFooter['
meta_copyright'])) {

            $content .= '
<meta name="DC.Rights" content="'.DublinQuotes($xoopsConfigMetaFooter['meta_copyright'])."" />n";

        }

    }



    
/**

     * Firefox 2 micro summaries

     */

    
if(news_getmoduleoption('firefox_microsummaries')) {

        
$content .= sprintf("<link rel="microsummary" href="%s" />n",XOOPS_URL.'/modules/news/micro_summary.php');

    }



    if(isset(
$xoopsTpl) && is_object($xoopsTpl)) {

        
$xoopsTpl->assign('xoops_module_header'$content);

    }

}







/**

 * Create the meta keywords based on the content

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_createmeta_keywords($content)

{

    include 
XOOPS_ROOT_PATH.'/modules/news/config.php';

    include_once 
XOOPS_ROOT_PATH.'/modules/news/class/blacklist.php';

    include_once 
XOOPS_ROOT_PATH.'/modules/news/class/registryfile.php';



    if(!
$cfg['meta_keywords_auto_generate']) {

        return 
'';

    }

    
$registry = new news_registryfile('news_metagen_options.txt');

    
$tcontent '';

    
$tcontent $registry->getfile();

    if(
xoops_trim($tcontent) != '') {

        list(
$keywordscount$keywordsorder) = explode(',',$tcontent);

    } else {

        
$keywordscount $cfg['meta_keywords_count'];

        
$keywordsorder $cfg['meta_keywords_order'];

    }



    
$tmp = array();

    
// Search for the "Minimum keyword length"

    
if(isset($_SESSION['news_keywords_limit'])) {

        
$limit $_SESSION['news_keywords_limit'];

    } else {

        
$config_handler =& xoops_gethandler('config');

        
$xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH);

        
$limit $xoopsConfigSearch['keyword_min'];

        
$_SESSION['news_keywords_limit'] = $limit;

    }

    
$myts =& MyTextSanitizer::getInstance();

    
$content str_replace ("<br />"" "$content);

    
$content$myts->undoHtmlSpecialChars($content);

    
$contentstrip_tags($content);

    
$content=strtolower($content);

    
$search_pattern=array("&nbsp;","t","rn","r","n",",",".","'",";",":",")","(",'"','?','!','{','}','[',']','<','>','/','+','-','_','\','*');

    
$replace_pattern=array(' ',' ',' ',' ',' ',' ',' ',' ','','','','','','','','','','','','','','','','','','','');

    
$content str_replace($search_pattern$replace_pattern$content);

    
$keywords explode(' ',$content);

    switch(
$keywordsorder) {

        case 
0:    // Ordre d'apparition dans le texte

            
$keywords array_unique($keywords);

            break;

        case 
1:    // Ordre de fréquence des mots

            
$keywords array_count_values($keywords);

            
asort($keywords);

            
$keywords array_keys($keywords);

            break;

        case 
2:    // Ordre inverse de la fréquence des mots

            
$keywords array_count_values($keywords);

            
arsort($keywords);

            
$keywords array_keys($keywords);

            break;

    }

    
// Remove black listed words

    
$metablack = new news_blacklist();

    
$words $metablack->getAllKeywords();

    
$keywords $metablack->remove_blacklisted($keywords);



    foreach(
$keywords as $keyword) {

        if(
strlen($keyword)>=$limit && !is_numeric($keyword)) {

            
$tmp[] = $keyword;

        }

    }

    
$tmp array_slice($tmp0$keywordscount);

    if(
count($tmp) > 0) {

        return 
implode(',',$tmp);

    } else {

        if(!isset(
$config_handler) || !is_object($config_handler)) {

            
$config_handler =& xoops_gethandler('config');

        }

        
$xoopsConfigMetaFooter =& $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER);

        if(isset(
$xoopsConfigMetaFooter['meta_keywords'])) {

            return 
$xoopsConfigMetaFooter['meta_keywords'];

        } else {

            return 
'';

        }

    }

}





/**

 * Remove module's cache

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

*/

function news_updateCache() {

    global 
$xoopsModule;

    
$folder $xoopsModule->getVar('dirname');

    
$tpllist = array();

    include_once 
XOOPS_ROOT_PATH.'/class/xoopsblock.php';

    include_once 
XOOPS_ROOT_PATH.'/class/template.php';

    
$tplfile_handler =& xoops_gethandler('tplfile');

    
$tpllist $tplfile_handler->find(nullnullnull$folder);

    
$xoopsTpl = new XoopsTpl();

    
xoops_template_clear_module_cache($xoopsModule->getVar('mid'));            // Clear module's blocks cache



    // Remove cache for each page.

    
foreach ($tpllist as $onetemplate) {

        if( 
$onetemplate->getVar('tpl_type') == 'module' ) {

            
// Note, I've been testing all the other methods (like the one of Smarty) and none of them run, that's why I have used this code

            
$files_del = array();

            
$files_del glob(XOOPS_CACHE_PATH.'/*'.$onetemplate->getVar('tpl_file').'*');

            if(
count($files_del) >0) {

                foreach(
$files_del as $one_file) {

                    
unlink($one_file);

                }

            }

        }

    }

}



/**

 * Verify that a MySQL table exists

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

*/

function news_TableExists($tablename)

{

    global 
$xoopsDB;

    
$result=$xoopsDB->queryF("SHOW TABLES LIKE '$tablename'");

    return(
$xoopsDB->getRowsNum($result) > 0);

}



/**

 * Verify that a field exists inside a MySQL table

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

*/

function news_FieldExists($fieldname,$table)

{

    global 
$xoopsDB;

    
$result=$xoopsDB->queryF("SHOW COLUMNS FROM    $table LIKE '$fieldname'");

    return(
$xoopsDB->getRowsNum($result) > 0);

}



/**

 * Add a field to a MySQL table

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_AddField($field$table)

{

    global 
$xoopsDB;

    
$result=$xoopsDB->queryF('ALTER TABLE ' $table " ADD $field;");

    return 
$result;

}



/**

 * Verify that the current user is a member of the Admin group

 */

function news_is_admin_group()

{

    global 
$xoopsUser$xoopsModule;

    if(
is_object($xoopsUser)) {

        if(
in_array('1',$xoopsUser->getGroups())) {

            return 
true;

        } else {

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

                return 
true;

            } else {

                return 
false;

            }

        }

    } else {

        return 
false;

    }

}





/**

 * Verify if the current "user" is a bot or not

 *

 * If you have a problem with this function, insert the folowing code just before the line if(isset($_SESSION['news_cache_bot'])) { :

 * return false;

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_isbot()

{

    if(isset(
$_SESSION['news_cache_bot'])) {

        return 
$_SESSION['news_cache_bot'];

    } else {

        
// Add here every bot you know separated by a pipe | (not matter with the upper or lower cases)

        // If you want to see the result for yourself, add your navigator's user agent at the end (mozilla for example)

        
$botlist='AbachoBOT|Arachnoidea|ASPSeek|Atomz|cosmos|crawl25-public.alexa.com|CrawlerBoy Pinpoint.com|Crawler|DeepIndex|EchO!|exabot|Excalibur Internet Spider|FAST-WebCrawler|Fluffy the spider|GAIS Robot/1.0B2|GaisLab data gatherer|Google|Googlebot-Image|googlebot|Gulliver|ia_archiver|Infoseek|Links2Go|Lycos_Spider_(modspider)|Lycos_Spider_(T-Rex)|MantraAgent|Mata Hari|Mercator|MicrosoftPrototypeCrawler|Mozilla@somewhere.com|MSNBOT|NEC Research Agent|NetMechanic|Nokia-WAPToolkit|nttdirectory_robot|Openfind|Oracle Ultra Search|PicoSearch|Pompos|Scooter|Slider_Search_v1-de|Slurp|Slurp.so|SlySearch|Spider|Spinne|SurferF3|Surfnomore Spider|suzuran|teomaagent1|TurnitinBot|Ultraseek|VoilaBot|vspider|W3C_Validator|Web Link Validator|WebTrends|WebZIP|whatUseek_winona|WISEbot|Xenu Link Sleuth|ZyBorg';

        
$botlist=strtoupper($botlist);

        
$currentagent=strtoupper(xoops_getenv('HTTP_USER_AGENT'));

        
$retval=false;

        
$botarray=explode('|',$botlist);

        foreach(
$botarray as $onebot) {

            if(
strstr($currentagent,$onebot)) {

                
$retval=true;

                break;

            }

        }

    }

    
$_SESSION['news_cache_bot']=$retval;

    return 
$retval;

}





/**

 * Create an infotip

 *

 * @package News

 * @author Instant Zero (http://xoops.instant-zero.com)

 * @copyright (c) Instant Zero

 */

function news_make_infotips($text)

{

    
$infotips news_getmoduleoption('infotips');

    if(
$infotips>0) {

        
$myts =& MyTextSanitizer::getInstance();

        return 
$myts->htmlSpecialChars(xoops_substr(strip_tags($text),0,$infotips));

    }

}

?>



64
JulioNC
Re: News 1.53: problems with WYSIWYG editor
  • 2007/3/28 15:15

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


XOOPS_ROOT_PATH/modules/news/include/functions.php

case 'koivi':

            if(!
$x22) {

                if ( 
is_readable(XOOPS_ROOT_PATH '/class/wysiwyg/formwysiwygtextarea.php')) {

                    include_once(
XOOPS_ROOT_PATH '/class/wysiwyg/formwysiwygtextarea.php');

                    
$editor = new XoopsFormWysiwygTextArea($caption$name$value'100%''450px''');

                }

            } else {

                
$editor = new XoopsFormEditor($caption'koivi'$editor_configs);

            }

            break;


by


case 'koivi':

            if(!
$x22) {

                if ( 
is_readable(XOOPS_ROOT_PATH '/[color=990033]class/xoopseditor/koivi[/color]/formwysiwygtextarea.php')) {

                    include_once(
XOOPS_ROOT_PATH '/[color=990033]class/xoopseditor/koivi[/color]/formwysiwygtextarea.php');

                    
$editor = new XoopsFormWysiwygTextArea($caption$name$value'100%''450px''');

                }

            } else {

                
$editor = new XoopsFormEditor($caption'koivi'$editor_configs);

            }


            break;


Download xoopseditor!
http://dev.xoops.org/modules/xfmod/project/?htmlarea


Julio,



65
JulioNC
Re: Cakephp and Xoops????
  • 2007/3/15 17:17

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


I don't believe it but we can do it.

In spanish:
Si bien no conozco a fondo CakePHP creo que sería muy fácil acoplarlo, el problema surgirá en la autentificación / manejo de sesiones entre XOOPS y CakePHP. Has intentado integrarlo?
Otra cosa (q no escrito en ingles) es el rendimiento y su uso con XOOPS, el sitio creceria tanto en tamaño como en complejidad de programación.

No crees que seria mas factible portar ciertas caracteristicas o clases a XOOPS y extender por ejemplo XOOPS Framework de phppp. (Tildes omitidas)



66
JulioNC
Re: theme default 2.2.5 adapting to xoops 2.0.16 default
  • 2007/1/4 17:24

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


default/theme.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<
head>
[
color=990033]<{assign var=theme_name value=$xoTheme->folderName}>[/color]

<
meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<
meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<
meta name="robots" content="<{$xoops_meta_robots}>" />
<
meta name="keywords" content="<{$xoops_meta_keywords}>" />
<
meta name="description" content="<{$xoops_meta_description}>" />
<
meta name="rating" content="<{$xoops_meta_rating}>" />
<
meta name="author" content="<{$xoops_meta_author}>" />
<
meta name="copyright" content="<{$xoops_meta_copyright}>" />
<
meta name="generator" content="XOOPS" />

<
title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
<
link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />

<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
[
color=990033]<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_imageurl}>css/style.css" />[/color]
<
script type="text/javascript" src="<{$xoops_imageurl}>js/adminmenu.js"></script>
<
script type="text/javascript" src="<{$xoops_imageurl}>js/ie5.js"></script>

<
script type="text/javascript">
function 
toggle(notifs_form
{
obj=document.getElementById(notifs_form);
obj.style.display=!(obj.style.display=="block")? "block" "none";  
}

function 
swapimage(swap)
{
img_plus="<{$xoops_imageurl}>images/plus.gif";
img_minus="<{$xoops_imageurl}>images/minus.gif";
obj=document.getElementById(swap);
obj.src=!(obj.src==img_minus)? img_minus img_plus;  
}

</
script>
<!-- 
RMVadded module header -->
<{
$xoops_module_header}>
</
head>
<
body>
<
div class="wrapper">
<
table class="toptable" cellspacing="0">
<
tr>
<
td id="headerlogo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>images/logo.gif" width="148" height="80" title="<{$smarty.const._YOURHOME}>" alt="<{$smarty.const._YOURHOME}>" /></a></td>
<
td id="headerbanner"><{$xoops_banner}></td>
</
tr>
<
tr>
<
td id="headerbar" colspan="2">
<{include 
file="$theme_name/navigation/theme_usernav.html"}>
</
td>
</
tr>
</
table>

<
table class="maintable" cellspacing="0">
<
tr>
<!-- 
Display left blocks start-->
<{if 
$xoops_showlblock == 1}>
<
td id="leftcolumn">
<!-- 
Start left blocks loop -->
<{foreach 
item=block from=$xoops_lblocks}>
<{include 
file="$theme_name/blocks/theme_blockleft.html"}>
<{/foreach}>
<!-- 
End left blocks loop -->
</
td>
<{/if}>
<!-- 
Display left blocks end -->

<
td id="centercolumn">
<!-- 
Display center blocks if any -->
<{if 
$xoops_showcblock == 1}>
<
table cellspacing="0">
<
tr>
<
td id="centerCcolumn" colspan="2">
<!-- 
Start center-center blocks loop -->
<{foreach 
item=block from=$xoops_ccblocks}>
<{include 
file="$theme_name/blocks/theme_blockcenter_c.html"}>
<{/foreach}>
<!-- 
End center-center blocks loop -->
</
td>
</
tr>
<
tr>
<
td id="centerLcolumn">
<!-- 
Start center-left blocks loop -->
<{foreach 
item=block from=$xoops_clblocks}>
<{include 
file="$theme_name/blocks/theme_blockcenter_l.html"}>
<{/foreach}>
<!-- 
End center-left blocks loop -->
</
td>
<
td id="centerRcolumn">
<!-- 
Start center-right blocks loop -->
<{foreach 
item=block from=$xoops_crblocks}>
<{include 
file="$theme_name/blocks/theme_blockcenter_r.html"}>
<{/foreach}>
<!-- 
End center-right blocks loop -->
</
td>
</
tr>
</
table>
<{/if}>
<!-- 
End display center blocks -->
<
div id="content">
<{
$xoops_contents}>
</
div>
</
td>
<!-- 
Display right blocks start-->
<{if 
$xoops_showrblock == 1}>
<
td id="rightcolumn">
<!-- 
Start right blocks loop -->
<{foreach 
item=block from=$xoops_rblocks}>
<{include 
file="$theme_name/blocks/theme_blockright.html"}>
<{/foreach}>
<!-- 
End right blocks loop -->
</
td>
<{/if}>
<!-- 
Display right blocks end-->
</
tr>
</
table>

<
table class="footertable" cellspacing="0">
<
tr>
<
td id="footerbar">
<{
$xoops_footer}>
</
td>
</
tr>
</
table>

</
div>
<
script type="text/javascript">
var 
menu1 = new AdMenu("menu1");
menu1.position.level1.top 1;
menu1.position.level1.left 0;
menu1.position.levelX.top 0;
menu1.position.levelX.left 0;
menu1.init();
</
script>
<!-- 
USER NAVIGATION BAR END -->
[
color=990033]    <!--{xo-logger-output}-->[/color]
</
body>

</
html>



default/navigation/theme_usernav.html

[color=990033]
<{
php}>

if(
file_exists(XOOPS_ROOT_PATH.'/themes/[b]default[/b]/language/'.$GLOBALS['xoopsConfig']['language'].'/main.php')){
    include_once 
XOOPS_ROOT_PATH.'/themes/xdt2016/language/'.$GLOBALS['xoopsConfig']['language'].'/main.php';

} else {
    include_once 
XOOPS_ROOT_PATH.'/themes/[b]default[/b]/language/english/main.php';
}
<{/
php}>
[/
color]


                    <!-- 
USER NAVIGATION BAR START -->

                    <
div id="navbar">

                        <
table cellspacing="0" cellpadding="0" id="menu1" class="NavMenu">

                            <
tr>

                                <{if 
$xoops_isuser == 1}>

                                    <
td>

                                        <
class="button" href="javascript:void(0)"><{$smarty.const._MA_NAV_ACTIONS}></a>

                                        <
div class="section">

                                            <
class="item" href="<{$xoops_url}>/user.php"><{$smarty.const._MA_NAV_VIEWACCOUNT}></a>

                                            <
class="item" href="<{$xoops_url}>/edituser.php"><{$smarty.const._MA_NAV_EDITACCOUNT}></a>

                                            <
class="item" href="<{$xoops_url}>/notifications.php"><{$smarty.const._MA_NAV_NOTIFICATIONS}></a>

                                            <
class="item" href="<{$xoops_url}>/user.php?op=logout"><{$smarty.const._MA_NAV_LOGOUT}></a>

                                            <{if 
$xoops_isadmin}>

                                                <
class="item" href="<{$xoops_url}>/admin.php"><{$smarty.const._MA_NAV_ADMINISTRATION}></a>

                                            <{/if}>

                                        </
div>

                                    </
td>

                                <{else}>

                                    <
td id="date"

                                        <{
$smarty.now|date_format:"%A, %e %B %Y"}>

                                    </
td>

                                <{/if}>

                                    <
td id="search">

                                        <
form style="margin: 0px;" action="<{$xoops_url}>/search.php" method="get">

                                              <
input type="text" name="query" size="14" />

                                            <
input type="hidden" name="action" value="results" />

                                            <
input class="formButton" type="submit" value="<{$smarty.const._SEARCH}>" />

                                              <{if 
$smarty.const.modid 1}>

                                            <
input type="hidden" name="mids[]" value="<{$smarty.const.modid}>" />

                                              <{/if}>

                                        </
form>

                                    </
td>

                            </
tr>

                        </
table>

                    </
div>



Best regards,

Julio



67
JulioNC
Re: Xoops 2.2.5-rc2 ????
  • 2006/11/10 23:15

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


Skalpa says;

The release of XOOPS 2.0.16 and 2.2.5 is scheduled for November 8th, and November 14th.

These are the last planned maintenance releases on both of these branches, and development efforts will be focused on the 2.3 trunk from now on.

People interested can already download 2.2.5-rc2 for testing purposes on sourceforge.



68
JulioNC
Re: Problem
  • 2006/8/14 18:09

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


Hi

you have an old version of xoops?
“Xoops Troubleshooting Page” sends to the Link of wikiWaka

- It reviews the connection to the data base
- Please, update a XOOPS 2.0.14.



69
JulioNC
Re: Xoopschat 1.5 not working with xoops 2014
  • 2006/8/14 18:01

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


Hi

and Discuss ?



70
JulioNC
Re: UPGRADE 2.0.10 ENGLISH TO 2.0.14 SPANISH
  • 2006/8/14 17:57

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


Quote:

But i don't understand where I have to put the folder called "upgrade" (as explains in item 4), and what to do then. Somebody can tell me?


XOOPS 2.0.14 ES

You can read the release notes
>> "Upgrading from any XOOPS version between 2.0.10 and 2.0.13.2" <<

My upgrade:

Note: From the preferences of the site it changes the language; english to spanish

1.- Upload htdocs/ folder except mainfile.php
2.- Steps 2, 3, 5 and 6 (release notes) xD
3.- Access < your.site.url>/upgrade/ using your browser, and follow the instructions
4.- Steps 8 and 9
5.- Update modules: system and others
why? in order to generate templates in spanish.


Espero que esto pueda ayudarte.
Saludos




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



Login

Who's Online

168 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 168


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