1
mondarse
Re: Home Page
  • 2021/11/6 19:51

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


An other not so simple method as Alain's one:

Use a custom php block.
Use code to get if the user is registered or anounymous.
Then with an if () { } else {} show different contents.

If worked for me, and even I show different contents depending on users group.



2
mondarse
Re: Session automatically closed after successuflly login
  • 2015/2/17 6:42

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


This site is running with no update from 3-4 years ago.
My hoster says that no php upgrade/change has been done in this time.

The problem used to happen from time to time previously, but now it happens every time.



3
mondarse
Session automatically closed after successuflly login
  • 2015/2/16 11:59

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


One of my sites has an strange behaviour that makes impossible to login if you don't delete cookies before, or if wait for a long long time (may be 1 day, not sure).

My site is configured like this:
- URL is a subfolder of main domain:https://www.????mydomain.com/courses/
https://www.????mydomain.com
 
is a different site with different filesdatabasecookie and session namesetc.)

- PHP Version 5.2.17
- Xoops: 2.5.6.
- Protocol: https
- Name for user cookies: x??????_user
- Use custom session: yes
- Session name: x?????_session
- Session expiration: 60

This error happens in this way:

- Fist login try of the day: everything goes ok, I can use the site normally.
- After use, I don't close session manually, simply leave the site loaded in the browser.
- After 1 hour or more, if I try to navigate again through the site I get the usual permissions error (needed to be logged to use the site).
- I try to log and the site shows that I have logged correctly with the redirect page (It doesn't use jGrowl redirect)
- After been redirected the main page is shown, but always logging block is displayed as sessions is actually closed.
- If I directly load site home page, It shows the login block.

If I delete cookies (only the ones of my site) I can log again without troubles.

Please help.



4
mondarse
New bbcode to include your site url
  • 2013/8/7 12:42

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


I would like to share a bbcode that I use in my sites and helps me to create direct (full url) links to a file in my site, and avoid relative links not working in my local wamp because I use different "XOOPS_URL" values for hosted site and local test site

Value for hosted site:
define('XOOPS_URL''http://www.mysite.com' );


Value for local wamp site:
define('XOOPS_URL''http://mypc/mytestsite1' );


In local wamp server realtive urls pointed tohttp://mypc so links or even images didn't worked because they should point tohttp://mypc/mytestsite1

I liked {X_SITEURL} that could only be used in blocks so I created a new bbcode that worked the same way with textsanitizer:

in /class/textsanitizer folder added a new folder "xu", and inside it the code in this file xu.php
<?php
/**
 * TextSanitizer extension
 *
 * 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.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      textsanitizer
 * @since           2.3.0
 * @author          mondarse <mondarse@gmail.com>
 * @version         $Id: xu.php 3575 2011-09-05 11:35:11Z mondarse $
 * @deprecated
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');

class 
MytsXu extends MyTextSanitizerExtension
{
    function 
load(&$ts)
    {
        
$ts->patterns[] = "/[xu]/sU";
        
$ts->replacements[] = XOOPS_URL;
        return 
true;
    }
}

?>


and also added a new value in the extension array in /class/textsanitizer/config.php
<?php
/**
 * TextSanitizer extension
 *
 * 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.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      textsanitizer
 * @since           2.3.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id: config.php 8066 2011-11-06 05:09:33Z beckmi $
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');

return 
$config = array(
    
"extensions" => array(
        
"iframe" => 0,
        
"image" => 1,
        
"flash" => 1,
        
"youtube" => 1,
        
"mp3" => 0,
        
"wmp" => 0,
        
// If other module is used, please modify the following detection and 'link' in /wiki/config.php
        
"wiki" => is_dir(XOOPS_ROOT_PATH '/modules/mediawiki/'),
        
"mms" => 0,
        
"rtsp" => 0,
        
"ul" => 1,
        
"li" => 1,
    
"xu" => 1),

    
"truncate_length" => 60,

    
// Filters XSS scripts on display of text
    // There is considerable trade-off between security and performance
    
"filterxss_on_display" => false);
?>


Hope this hack would be useful.

MonDarSE



5
mondarse
Re: XOOPS 2.5.6 Final Release Issues
  • 2013/8/7 11:54

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


I have just updated my site from 2.5.5 to 2.5.6, and I found a file included in the update zip (http://sourceforge.net/projects/xoops/files/XOOPS%20Core%20%28stable%20releases%29/XOOPS_2.5.6/xoops2.5.5-to-2.5.6.zip/download)

/htdocs/class/textsanitizer/image/config.php

that should not be included because code hasn't been modified at all from v2.5.5 to v2.5.6, only found one different line in header comments:
* @version         $Idconfig.php 8066 2011-11-06 05:09:33Z beckmi $


* @version         $Idconfig.php 10939 2013-01-28 06:02:56Z beckmi $


and corrected typo (CaricFoto -> CaricaFoto) in an other comment in this line:
// Click to open an image in a new window in full size using CaricaFoto


When upgraded from v2.0.18.2. to v2.5.0 (many time ago), I modified config.php so CaricaFoto is not active in my site, setting values in the array to 0.
When I have applied the 255 to 256 upgrade all of bbcodes for links including images and texts didn't worked any more.

I have spent half an our trying to find what had been changed in textsanitizer from version to version and finally found that new config.php set CaricaFoto active again.

If you think that /htdocs/class/textsanitizer/image/config.php must be included in the upgrade package at least advise to check that file in "release_notes.txt" if the user has changed any value in it.



6
mondarse
Re: Planing to start coding my first module, where to start?
  • 2013/7/30 12:35

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


Yes it has many bugs, the first, the one that showed blank page as I talked before is as simple as a missing coma in generated mainfile.php:

$modversion[] = array(
...
'release' => "2013/06/12",
'module_status' => "Beta"
// Admin system menu
    
'system_menu' => 1,
...
<== missing coma

Finally, I'm starting a write my module looking into userlog module code for reference.
Don't know if objects for managing db tables created with tdmcreate will be useful or not.



7
mondarse
Re: Planing to start coding my first module, where to start?
  • 2013/7/30 9:36

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


Quote:

Mamba wrote:
Quote:
I have tried TDMCreate 1.39RC1 but generated code simply gets blank page when trying to view new modules to install in my local wampserver (apache 2.2.11, php 5.3, mysql 5.136)

That shouldn't happen. Can you try the latest code for 1.39 from the SVN again?


Hi Mamba, can you check if this is the correct link to 1.39 SVN?, I get a bit confused:
http://sourceforge.net/p/xoops/svn/11858/tree/XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/

Thanks



8
mondarse
Re: Slider on the header/footer
  • 2013/7/30 7:44

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


That code worked for me.

I guess you still have your slider code in theme.html

Cut and paste the slider code to "/xotpl/slider.html" (create file if you don't have it already), and of course upload "theme.html" and "/xotpl/slider.html" to your site.

Remember also to clear caches completely or activate "theme change check" in admin to see the results.

If you can't success let us see your code by copying and pasting here the section of theme.html where your slider goes in.

MonDarSe




9
mondarse
Re: Planing to start coding my first module, where to start?
  • 2013/6/14 16:18

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


Quote:

iunderwood wrote:
My advice for starting out is to get intimately familiar with the administrative back end sorts of things: Module Preferences, Blocks Preferences as you code pages and things.

The second thing to learn is how to use Smarty templates.

It never hurts to learn the API, but I have always learned the most when there are other modules to observe. You'll find there are several ways to accomplish things.

Some of my old code was truly disastrous and difficult to modify.


Thank you also to iunderwood, I think I have learned enough about preferences, blocks, admin, smarty, and so on last years translating modules to Spanish, reading the code for hacking some modules like myquiz module to make online timed exams and coding some php pages inside iContent module to create some kind of "custom online courses" for my work.

Now I would like to to code a new quiz module from scratch, and if I learn enough with it, coding some kind of lms, or at least some way for creating a module for managing courses, lessons, documents, exams, curse quality surveys and an easy way for curse admins to add and link forums and its permissions to courses or even one forum for each lesson the way I now do manually by my self.



10
mondarse
Re: Planing to start coding my first module, where to start?
  • 2013/6/14 15:20

  • mondarse

  • Just popping in

  • Posts: 96

  • Since: 2003/2/3 1


Thank you very much for your help.

I'm going to read irmtfan manual then studying also his log module and at last starting to code.




TopTop
(1) 2 3 4 5 »



Login

Who's Online

172 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 172


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