290141
Hausner
Re: Hack Request: Newbb mark all as read
  • 2003/10/17 8:32

  • Hausner

  • Just popping in

  • Posts: 2

  • Since: 2003/9/6 1


I've just looked through the original PHPBB2 and I've found this:

// Handle marking posts
//
if ( $mark_read == 'topics' )
{
if ( $userdata['session_logged_in'] )
{
$sql = "SELECT MAX(post_time) AS last_post
FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();

if ( ( count($tracking_forums) + count($tracking_topics) ) >= 150 && empty($tracking_forums[$forum_id]) )
{
asort($tracking_forums);
unset($tracking_forums[key($tracking_forums)]);
}

if ( $row['last_post'] > $userdata['user_lastvisit'] )
{
$tracking_forums[$forum_id] = time();

setcookie($board_config['cookie_name'] . '_f', serialize($tracking_forums), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
}
}

$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
}

$message = $lang['Topics_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a> ');
message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

This is the code that Marks all topics as read, can anyone convert that to Xoops?



290142
Herko
Re: Module Categorization
  • 2003/10/17 7:56

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Quote:

hsalazar wrote:
3) The registry would show only the latest version of each module.

I agree with all the above, just one thing to add: compatibility to core systems. If a module need to be changed because of the core changes, then we'll need to add older versions for older core systems. For instance: 1.3.x, 2.01-2.03, 2.05-2.1 those kind of ranges. That way when people have a site up and running on an old core, they still can get their modules to work on them

Herko



290143
ceca69
XOOPS 2.0.5 News 1.1 module problem
  • 2003/10/17 7:53

  • ceca69

  • Just popping in

  • Posts: 8

  • Since: 2003/9/29


Hi,
I have installed XOOPS 2.0.5 and the News 1.1 module (that one with the XOOPS zip file).
The only user created is the Webmaster.

Problem:
- Once I have added a News I don't know how to approve it.
- When a News is waiting to be approved (a news created by me) I'm not autorized to modify it.

From "News Configuration" I can only delete it.

Can anyone suggest me a working News module?

THX

Ceca



290144
catalin
Re: Static page generation
  • 2003/10/17 7:26

  • catalin

  • Just popping in

  • Posts: 30

  • Since: 2003/9/4 7


sunsnapper ... if XOOPS would genereate from the code i gaved here an html version of the site every "whattimeuwant" (using the script) al 900 search engines on the net will index it like hell and there wont be any more need for other stupid search engine services or other thingies like that ... just XOOPS ... this wiil do a lot of good for XOOPS ( becomnig with the help of the indexed sites ( which for sure will have top 3 in google ) the #1 CMS on the net ).

It`s your choice ... i don`t have time and don`t know the XOOPS core very well to develop an XOOPS version of this script.

Anyway u chose ... But a module that genereates static pages ( html versions of the site would be apreciated ) i mean it ... and not only for google ... even yahoo, overture, astalavista and ho knows what other major webengines ... u name it ...

search engines WON`T index dinamicaly generated pages ( php ) farther then the level 2 ( level 2 of indexing out of 10 ) ... i mean it ... because of fear of geting stuck in url that look alike ...

It all depends on the XOOPS core team ... if they can do that ...

can ya ?



290145
catalin
Re: Static page generation
  • 2003/10/17 7:18

  • catalin

  • Just popping in

  • Posts: 30

  • Since: 2003/9/4 7


k, i found out that b2evolution has the power to gen static pages out of the php pages ( visit www.cyber-cup.ro/blog/blog_a.html if ya don`t believe me ) and afterwards visit www.cyber-cup.ro/blog/ they are identical ( almost cause i did not update the html ) ... but anyway ...

the b2evolution has a script ( that i ripped it from the b2blogs.php file ) that takes the path of the php file from the MySQL database, takes the filename and all other thingies and using ob_get ( more on php.net ) and fsock generates a clean super html file ... that google indexes it like hell man ... i mean u will win top 3 in just MAXIMUM 2 weeks.

here is the source code of the script but i don`t know how to teleport it as a module for Xoops.

<?php
if ($user_level < 2)
{
die( T_('You have no right to generate static pages.') );
}

$staticfilename = get_bloginfo('staticfilename');
if( empty( $staticfilename ) )
{
echo '<p>', T_('You haven\'t set a static filename for this blog!'), "</p>\n</div>\n";
break;
}

// Determine the edit folder:
$edit_folder = get_path( 'base' ) .get_bloginfo('subdir');
$filename = $edit_folder.'/'.get_bloginfo('filename');
$staticfilename = $edit_folder.'/'.$staticfilename;

printf( T_('Generating page from <strong>%s</strong> to <strong>%s</strong>...'), $filename, $staticfilename );
echo "<br />\n";
flush();

ob_start();
require $filename;
$page = ob_get_contents();
ob_end_clean();

// Switching back to default locale (the blog page may have changed it):
locale_activate( $default_locale );

echo T_('Writing to file...'), '<br />', "\n";

$fp = fopen ( $staticfilename, "w");
fwrite($fp, $page);
fclose($fp);

echo T_('Done.'), '<br />', "\n";
?>


can u make it a module for XOOPS ??? plsss ... for google maniacs and other thingies like that it would make a great diference ...



290146
catalin
Re: Search Engines: Just so you know
  • 2003/10/17 7:10

  • catalin

  • Just popping in

  • Posts: 30

  • Since: 2003/9/4 7


next time use in the template the

<meta name="revisit-after" content="1 days"> or how many days u wnat and u will be back in top 10 in no time ... actualy 2 days max



290147
hsalazar
Re: Module Categorization
  • 2003/10/17 6:58

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


You are correct. In fact, this could be a good moment to ask the XOOPS community about ideas for the registry. So far:

1) All modules available could be stored in a central repository. This would allow translators to provide language constant files in order to make them available with as many languages as possible.

2) The modules would be organized by categories.

3) The registry would show only the latest version of each module.

4) Each module would have maybe a page describing its features and limitations, and also links to historical versions.

And of course, we'll be needing all the help we can get if we want to succeed in taking XOOPS where no other open source CMS has gone before <grin>. Any more ideas?




290148
sunsnapper
Re: Module Categorization

Hopefully I've identified the correct category for these, and others will comment with suggestions for new categories or placements.

When you get ready to roll on the registry, I'm happy to help.

The other thing that would be nice in a registry would be to not have it cluttered up with old versions of the same module. Perhaps old versions could be available in a version history instead.



290149
hsalazar
Re: Module Categorization
  • 2003/10/17 6:22

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


sunsnapper:

In fact this will indeed be useful. There's in the horizon a thing called the module registry, where we'll keep track of every module we can find and its features, and certainly having a nice, uncluttered organization will ease things for every xoopser around. Thanks for this draft and for the time it required to do it.

Cheers.



290150
lajab
Re: New avatars for download
  • 2003/10/17 6:13

  • lajab

  • Just popping in

  • Posts: 47

  • Since: 2003/9/3 1


Does anyone know of Comic/Fantasy/Anime Avatars that I can download and upload all at once without having to do them one by one?

Thanks in advance!







Login

Who's Online

116 user(s) are online (66 user(s) are browsing Support Forums)


Members: 0


Guests: 116


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