11
Dave_L
Re: how don't display ip adress in comments end posts
  • 2004/5/31 14:36

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


No, not even with relative certainly.

header.php would have to studied more carefully, to see exactly what it's doing.

When I was experimenting with caching, I wrote the following as an aid:

// For testing caching. #*#DEBUG#
// Must start with "insert_" to be accessed by Smarty insert tag.
function insert_cachetest_show_date()
{
   return 
date('Y-m-d H:i:s');
}


Then in a template, you can add:

<{* #*#DEBUG# *}>
<table width="%25">
<
tr><td>Page generated:</td><td><{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}></td></tr>
<
tr><td>Current time:</td><td><{insert name="cachetest_show_date"}></td></tr>
</
table>


If the times displayed are different, that shows that the page is retrieved from the cache.

----
Edit

The Smarty insert function, which I used above, provides a way of including dynamically generated content within a cached template. That could be another approach for solving the problem discussed in this thread.

12
tamerlo
Re: how don't display ip adress in comments end posts
  • 2004/6/2 15:08

  • tamerlo

  • Just popping in

  • Posts: 71

  • Since: 2004/1/30


Hi! I have analysed the problem and this is my conclusion: expecially when a privileged user visit often a page of cached module if the cache is generated during his visit a folliwing user, also not in admin group, render the same page of administrator... i.e. with IP and other note on user the post a comment

I will try to use the modify to the source to disable the cache for users in admin group proposed bu Dave, many thanks

13
tamerlo
Re: how don't display ip adress in comments end posts
  • 2004/6/2 15:46

  • tamerlo

  • Just popping in

  • Posts: 71

  • Since: 2004/1/30


I have success with this modify:

at line 209 of file header.php I have changed:

if (xoops_getenv('REQUEST_METHOD') != 'POST' && !empty($xoopsModule) && !empty($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')])  ) {


in
if (xoops_getenv('REQUEST_METHOD') != 'POST' && !empty($xoopsModule) && !empty($xoopsConfig['module_cache'][$xoopsModule->getVar('mid')])    && !$xoopsUser->isAdmin($xoopsModule->mid())) {


so the cache of this module is used, and generated, only if the user is an administrator of this module. What you think?

Login

Who's Online

171 user(s) are online (93 user(s) are browsing Support Forums)


Members: 0


Guests: 171


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