1
JBzh
Re: Module Repository: Question and Answer Session
  • 2009/12/4 9:54

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


Quote:
as long as your module will get approved for inclusion by the Modules Team


Will a XOOPS module maintainer status be created ?
I like the way Debian works : packages are maintained by a Debian developer.

It can be the same for XOOPS modules (and languages packs, editors, themes) : a XOOPS developer is responsible for making the XOOPS package, testing it, report the bugs to the module/theme/editor/language pack developer and help resolve it, and propose it for inclusion into the repository.

Maybe, like it's done with Debian repository, 3 repositories can be created :
- Unstable : for packages which are being tested by the XOOPS dev. or are in alpha stage of development
- Testing : for packages tested and declared usable on a test website.
- Stable : packages declared usable on a production website

With the upcoming XOOPS 2.5 and XOOPS 3, maybe it is a good time to do this ?

Becoming a Debian developer takes some times (a year or so), you need a mentor, and a good knowledge of Debian policies, community, and manuals.
We could take example on Debian and set this learning process ?

This system includes that there are 3 dist of XOOPS : unstable, testing, and stable.
Stable dist of Debian is really reliable. We could propose a stable release of XOOPS which requires no critical bug in any packages including core, that would be an example CMS just as Debian stable is a reference in the Linux world.

Another advantage : testers (anyone) can install the unstable or testing dist and report bugs to XOOPS packages maintainers.

You might have already thing of all this, I just wanted to give my opinion :)



2
JBzh
Re: No Editors available
  • 2009/11/3 11:03

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


I have exactly the same situation on the two websites I maintain.
- First website : Linux Debian stable, PHP 5.2.6-1+lenny2, MyQSL 5.0.51a-24
- Second website : Free.fr hosting, PHP 4.4.3-dev, MySQL 5.0.83

I downloaded and installed the 2.4.0 full package.
Clean install, not an upgrade.

xoops_data (renamed) and all subdirectories are writeable.

And as willemd said :
Quote:
The only place where I can select a default editor is in the News module, but the dropdownbox for selecting an editor is completely empty ...



3
JBzh
Re: Does an empty module logo exists ?
  • 2009/10/23 14:43

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


Thank you Mamba



4
JBzh
Does an empty module logo exists ?
  • 2009/10/23 13:59

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


Hi,
I can't find an empty module logo, a blue one.
I'm not used to software like TheGimp or Paint shop pro to make one by myself, I would like just an empty module logo on which I can write my module's name an add an icon.
Is an empty module logo available ?
Best regards,
Jean Coiron



5
JBzh
Re: Changing the search function in xoops site
  • 2008/1/31 9:57

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


I had the same situation as nmshah, and at first I thought I could set the hasSearch parameter to 0.
But after I did that the iSearch module stopped reccording the searches keywords.
I set hasSearch to 1 or 0 few times and updated the module each time to be sure.


So I supposed iSearch records keywords when called from search.php here :
$results =& $module->search($queries$andor50);

I changed it to :
// Here is the only line I added beside the close bracket of course :
if ( $module->getVar('name') != _MI_ISEARCH_NAME ) {
    
$results =& $module->search($queries$andor50);
    echo 
"<h4>".$module->getVar('name')."</h4>";  // => here is what I wanted to remove.
    
$count count($results);
    if (!
is_array($results) || $count == 0) {
    echo 
"<p>"._SR_NOMATCH."</p>"// => That too
    
} else {
        for (
$i 0$i $count$i++) {
            
// => And every echo below too
            
if (isset($results[$i]['image']) && $results[$i]['image'] != "") {
                echo 
"<img src='modules/".$module->getVar('dirname')."/".$results[$i]['image']."' alt='".$module->getVar('name')."' />&nbsp;";
            } else {
                echo 
"<img src='images/icons/posticon2.gif' alt='".$module->getVar('name')."' width='26' height='26' />&nbsp;";
            }
            echo 
"<b><a href='modules/".$module->getVar('dirname')."/".$results[$i]['link']."'>".$myts->makeTboxData4Show($results[$i]['title'])."</a></b><br />n";
            echo 
"<small>";
            
$results[$i]['uid'] = intval($results[$i]['uid']);
            if ( !empty(
$results[$i]['uid']) ) {
                
$uname XoopsUser::getUnameFromId($results[$i]['uid']);
                echo 
"&nbsp;&nbsp;<a href='".XOOPS_URL."/userinfo.php?uid=".$results[$i]['uid']."'>".$uname."</a>n";
            }
            echo 
$results[$i]['time'] ? " ("formatTimestamp(intval($results[$i]['time'])).")" "";
            echo 
"</small><br />n";
        }
        if ( 
$count == ) {
            
$search_url XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' '$queries)));
            
$search_url .= "&mid=$mid&action=showall&andor=$andor";
            echo 
'<br /><a href="'.$search_url.'">'._SR_SHOWALLR.'</a></p>';
        }
    }
    unset(
$results);
    unset(
$module);
//here is the close bracket :
}

Then I set hasSearch parameters to 1 and updated the module.

Well, iSearch still records the searches keywords. So I was wrong, iSearch doesn't record keywords when called here.
But now an iSearch part in the search results page is no longer displayed, which was what I wanted.
I don't know what $results =& $module->search($queries, $andor, 5, 0); does, so I placed the test just after it :
$results =& $module->search($queries$andor50);
if ( 
$module->getVar('name') != _MI_ISEARCH_NAME ) {
    echo 
"<h4>".$module->getVar('name')."</h4>";  // => here is what I wanted to remove.
    
$count count($results);
    if (!
is_array($results) || $count == 0) {
    echo 
"<p>"._SR_NOMATCH."</p>"// => That too
    
} else {
        for (
$i 0$i $count$i++) {
            
// => And every echo below too
            
if (isset($results[$i]['image']) && $results[$i]['image'] != "") {
                echo 
"<img src='modules/".$module->getVar('dirname')."/".$results[$i]['image']."' alt='".$module->getVar('name')."' />&nbsp;";
            } else {
                echo 
"<img src='images/icons/posticon2.gif' alt='".$module->getVar('name')."' width='26' height='26' />&nbsp;";
            }
            echo 
"<b><a href='modules/".$module->getVar('dirname')."/".$results[$i]['link']."'>".$myts->makeTboxData4Show($results[$i]['title'])."</a></b><br />n";
            echo 
"<small>";
            
$results[$i]['uid'] = intval($results[$i]['uid']);
            if ( !empty(
$results[$i]['uid']) ) {
                
$uname XoopsUser::getUnameFromId($results[$i]['uid']);
                echo 
"&nbsp;&nbsp;<a href='".XOOPS_URL."/userinfo.php?uid=".$results[$i]['uid']."'>".$uname."</a>n";
            }
            echo 
$results[$i]['time'] ? " ("formatTimestamp(intval($results[$i]['time'])).")" "";
            echo 
"</small><br />n";
        }
        if ( 
$count == ) {
            
$search_url XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' '$queries)));
            
$search_url .= "&mid=$mid&action=showall&andor=$andor";
            echo 
'<br /><a href="'.$search_url.'">'._SR_SHOWALLR.'</a></p>';
        }
    }
    unset(
$results);
    unset(
$module);
}


I don't like the way I changed search.php code, if anyone sees a better method I would appreciate :)

I did worse then : I wanted to remove the iSearch checkbox in advanced search form ("Search in" list).
Couldn't find something else, so in the class/xoopsform/formcheckbox.php :
foreach ( $this->getOptions() as $value => $name ) {
    if ( 
$name != _MI_ISEARCH_NAME ) {
        
$ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'";
        if (
count($this->getValue()) > && in_array($value$this->getValue())) {
            
$ret .= " checked='checked'";
        }
        
$ret .= $this->getExtra()." />".$name."n";
    }
}
return 
$ret;


I am still looking to find where iSearch is called, where the code which records the keywords searched is.



6
JBzh
Re: Display all the center content inside an Iframe - Smarty code not executed
  • 2007/3/22 15:04

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


Still working on it.
In style.css :
[b]div[/b]#leftcolumn { [b]position:fixed; overflow: auto; top: 1px;[/b] }

[b]div[/b]#leftcolumn {width: 170px; border-right: 1px solid #cccccc; font-size:11px;}
[b]div[/b]#leftcolumn th {background-color: #2F5376; color: #FFFFFF; vertical-align: middle;}
[b]div[/b]#leftcolumn div.blockTitle {padding: 3px; background-color: #dddddd; color: #639ACE; font-weight: bold;}
[b]div[/b]#leftcolumn div.blockContent {padding: 3px; line-height: 120%; line-height: 120%;}


[b]div[/b]#centercolumn {font-size: 12px; [b]position:absolute; left: 180px; top: 90px[/b]}

[b]div[/b]#centercolumn th {background-color: #2F5376; color: #FFFFFF; vertical-align: middle;}

[b]div[/b]#rightcolumn {width: 170px; border-left: 1px solid #cccccc; font-size:12px;}
[b]div[/b]#rightcolumn th {background-color: #2F5376; color: #FFFFFF; vertical-align: middle;}
[b]div[/b]#rightcolumn div.blockTitle {padding: 3px; background-color: #dddddd; color: #639ACE; font-weight: bold;}
[b]div[/b]#rightcolumn div.blockContent {padding: 3px; line-height: 120%;}



In theme.html :
<[b]div[/bid="leftcolumn">
        <!-- 
Start left blocks loop -->
        <{foreach 
item=block from=$xoops_lblocks}>
          <{include 
file="default/theme_blockleft.html"}>
        <{/foreach}>
        <!-- 
End left blocks loop -->

      </[
b]div[/b]>

      <[
b]div[/bid="centercolumn">

      <!-- 
      
I kept the table for centerCcolumncenterLcolumn, and centerRcolumnWorking on using [u]only[/udiv and no tables.
      -->

        <
div id="content">
          <{
$xoops_contents}>
        </
div>
      </
div>

      <{if 
$xoops_showrblock == 1}>

      <[
b]div[/bid="rightcolumn">
        <!-- 
Start right blocks loop -->
        <{foreach 
item=block from=$xoops_rblocks}>
          <{include 
file="default/theme_blockright.html"}>
        <{/foreach}>
        <!-- 
End right blocks loop -->
      </[
b]div[/b]>


I hope I'll have a valid CSS theme soon using the default theme.



7
JBzh
Re: Display all the center content inside an Iframe - Smarty code not executed
  • 2007/3/21 16:38

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


I found a way to have a fixe menu using CSS.
In style.css :
td#leftcolumn { position:fixed; overflow: auto; top: 1px; }
td#centercolumn {font-size: 12px; position:absolute; left: 180px; }

It works with Firefox but not yet with Internet Explorer.

I'm suprised there's not post about this in the Support forums. Maybe I didn't search enough.



8
JBzh
Display all the center content inside an Iframe - Smarty code not executed
  • 2007/3/15 14:11

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


Hello,
I'd like to include everything in the centercolumn inside an Iframe.
Something like : (theme.html)
<td id="centercolumn">
 
          <
IFRAME SRC="themes/default/theme_center.html" WIDTH=450 HEIGHT=100>
          
Si vous pouvez lire ceci alors votre navigateur ne permet pas d'acceder à la base de connaissances.<br />
          Vous pouvez contacter l'
administrateur jcoiron@brest.symag.com
          
</IFRAME>
      </
td>

But if I do so, it doesn't execute the smarty code.
I search the forum and can't find a way to fix this.

Can anyone give me a hint ?

Regards,
Jean

[Edit]
I only need to keep the main menu always in the top left corner when scrolling the page down. I'm curently looking for a javascript that I could use.
[/Edit]



9
JBzh
Re: How to log users connections into a text file ? (Newbie)
  • 2007/1/10 17:02

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


I made some mistakes, it works now.
It's pretty simple, I'm ashamed to bother the XOOPS community with my questions

Here is the thing, hopefully it will be usefull to someone :

File /xoops/html/logusernav.php :
<?php
$ip_to_log 
$_SERVER['REMOTE_ADDR'];
$url_to_log $_SERVER['REQUEST_URI'];
if ( !
$xoopsUser ) {
    
$uid_to_log "0";
    
$uname_to_log "ANONYMOUS_NONAME";
}
else {
    
$uid_to_log $xoopsUser->getVar('uid');
    
$uname_to_log $xoopsUser->getVar('uname');
}

$content_to_log date('Ymd-H:i:s')." ".$ip_to_log." ".$uid_to_log." ".$uname_to_log." ".$url_to_log."n";

$log_file_name XOOPS_ROOT_PATH.'/logusernav.log';

if (!
$log_file_handle fopen($log_file_name'a')) {
    echo 
"<!-- Cannot open file ($log_file_name) -->";
}
else {
    if (
fwrite($log_file_handle$content_to_log) === FALSE) {
        echo 
"<!-- Cannot write to file ($log_file_name) -->";
    }
    @
fclose($log_file_handle);
}
?>

Code to add at the end of /xoops/html/footer.php :
include(XOOPS_ROOT_PATH."/logusernav.php");

It gives you the following logs :
20070110-16:27:46 192.168.1.124 0 ANONYMOUS_NONAME /xoops/html/index.php
20070110
-16:28:27 192.168.1.124 5 jcoiron /xoops/html/index.php
20070110
-16:29:16 192.168.1.124 5 jcoiron /xoops/html/
20070110-16:29:18 192.168.1.124 5 jcoiron /xoops/html/modules/istats/
20070110-16:36:45 192.168.1.124 5 jcoiron /xoops/html/
20070110-17:42:02 192.168.1.124 5 jcoiron /xoops/html/modules/news/
20070110-17:42:05 192.168.1.124 5 jcoiron /xoops/html/modules/news/article.php?storyid=1279
20070110
-17:45:38 192.168.1.124 5 jcoiron /xoops/html/modules/xoopsmembers/

Warning ! This produce a lot of logs.

If you don't need to keep a record of everything your users do, the module UserVisit is probably what you're looking for :
http://sourceforge.net/project/showfiles.php?group_id=41586&package_id=105497&release_id=207281



10
JBzh
How to log users connections into a text file (Newbie)
  • 2007/1/10 10:31

  • JBzh

  • Just popping in

  • Posts: 18

  • Since: 2004/4/26


I couldn't find a hack to log into a file the users connections/browsing. So I put the following in a file named logusernav.php :
<?php

print "<!-- Beginning user log  -->";


if ( !
$xoopsuser ) {
        
$user_to_log "Anonymous usern";
}
else {
        
$user_to_log "User ID: ".$xoopsUser->getVar('uid')."n";
}

$content_to_log $date('Ymd-H:i:s')." ".$user_to_log." n";


$log_file_name XOOPS_ROOT_PATH.'logusernav.txt';

if (!
$log_file_handle fopen($log_file_name'a')) {
    echo 
"<!-- Cannot open file ($log_file_name) -->";
}
else {

    if (
fwrite($log_file_handle$content_to_log) === FALSE) {
        echo 
"<!-- Cannot write to file ($log_file_name) -->";
    }
    @
fclose($log_file_handle);
}



?>


But if I include it in the main index.php or footer.php it does nothing. It doesn't even print "Beginning user log".

I added :
echo "<!-- nnn ----------------------include loguservnav ----------------nn -->";
include 
"logusernav.php";
echo 
"<!-- nnn ----------------------fin include loguservnav ----------------nn -->";

in footer.php just one line before the final "?>". It does add the comments, "include loguservnav" and the rest, but nothing from logusernav.php .

Can anyone give me a hint ? I'm curently connected to #xoopssupport and would really appreciate any help.

The logs I'm looking to obtain is :
[timestamp] userIP userid username url

I Hope I posted in the right place.




TopTop
(1) 2 »



Login

Who's Online

194 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 194


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