Topic Calendar (regular phpBB edition)

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
265
59%
Very Good
97
22%
Good
44
10%
Fair
10
2%
Poor
32
7%
 
Total votes: 448

InTimo
Registered User
Posts: 18
Joined: Fri Dec 07, 2007 10:08 pm

Re: Topic Calendar (regular phpBB edition)

Post by InTimo » Thu May 08, 2008 12:26 pm

Bad news for me .. I mailed to the MOD Author ..
My MOD is outdated. Use another MOD. Otherwise, you'll have to open
source code and study it in order to find your problem.
I don't code anymore for phpBB. I don't like the new guys leading
the project.
:(

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: Topic Calendar (regular phpBB edition)

Post by Ptirhiik » Thu May 08, 2008 1:33 pm

erm... Well, do you have a zip with the whole mod (original version) ?

InTimo
Registered User
Posts: 18
Joined: Fri Dec 07, 2007 10:08 pm

Re: Topic Calendar (regular phpBB edition)

Post by InTimo » Thu May 08, 2008 7:34 pm

Hello,

no Problem ;) .. here´s the URL http://space.homaer.de/switch_style.zip

I don´t use the included styles.html/php

Timo

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: Topic Calendar (regular phpBB edition)

Post by Ptirhiik » Thu May 08, 2008 10:08 pm

I will have a look to at least fix the security weaknesses.

InTimo
Registered User
Posts: 18
Joined: Fri Dec 07, 2007 10:08 pm

Re: Topic Calendar (regular phpBB edition)

Post by InTimo » Fri May 09, 2008 7:18 am

Many thanks to you ..

Timo

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: Topic Calendar (regular phpBB edition)

Post by Ptirhiik » Fri May 09, 2008 10:35 am

Ok, in replacement of the whole mod: you will notice I add POST_STYLE_URL constant in replacement of the qualified 'style=' string. This may imply some changes to your custom code. I let my test example modifications at end to express what I mean ;)

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
common.php
#
#-----[ FIND ]------------------------------------------------
#
$gen_simple_header = FALSE;
#
#-----[ AFTER, ADD ]------------------------------------------
#

//---------start mod: Switch Style From URL-------------------------
$ssu_get = false;
//---------fin mod: Switch Style From URL---------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
define('POST_GROUPS_URL', 'g');
#
#-----[ AFTER, ADD ]------------------------------------------
#
//---------start mod: Switch Style From URL-------------------------
define('POST_STYLE_URL', 'style');
//---------fin mod: Switch Style From URL---------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
	//
	// Set up style
	//
	if ( !$board_config['override_user_style'] )
	{
#
#-----[ AFTER, ADD ]------------------------------------------
#
//---------start mod: Switch Style From URL-------------------------
		global $HTTP_GET_VARS;
		if ( !defined('IN_ADMIN') && isset($HTTP_GET_VARS[POST_STYLE_URL]) && ($GLOBALS['ssu_get'] = intval($HTTP_GET_VARS[POST_STYLE_URL])) && ($theme = setup_style($GLOBALS['ssu_get'])) )
		{
			return;
		}
		$GLOBALS['ssu_get'] = false;
//---------fin mod: Switch Style From URL---------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------------
#
	if ( !empty($SID) && !preg_match('#sid=#', $url) )
	{
		$url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//---------start mod: Switch Style From URL-------------------------
	// nb - ptirhiik: when style is on a form (usercp_*), it is always recovered from $HTTP_POST_VARS, never from $HTTP_GET_VARS: we don't need so to check it
	if ( !defined('IN_ADMIN') && isset($GLOBALS['ssu_get']) && intval($GLOBALS['ssu_get']) && !preg_match('#' . POST_STYLE_URL . '=#i', $url) )
	{
		$url .= (strpos($url, '?') !== false ? ($non_html_amp ? '&' : '&') : '?') . POST_STYLE_URL . '=' . intval($GLOBALS['ssu_get']);
	}
//---------fin mod: Switch Style From URL---------------------------
###################################################
#
# The following is specific to topic calendar 1.2.2
#
#
#-----[ OPEN ]------------------------------------------------
#
includes/class_calendar_backport.php
#
#-----[ FIND ]------------------------------------------------
#
		if ( $add_sid && empty($parms['sid']) )
		{
			$parms['sid'] = substr($this->SID, strlen('sid='));
		}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//---------start mod: Switch Style From URL-------------------------
		if ( $add_sid && !defined('IN_ADMIN') && isset($GLOBALS['ssu_get']) && intval($GLOBALS['ssu_get']) && !isset($parms[POST_STYLE_URL]) )
		{
			$parms[POST_STYLE_URL] = intval($GLOBALS['ssu_get']);
		}
//---------fin mod: Switch Style From URL---------------------------
###################################################
#
# The following reflects my tests: selecting a style sends back to index
#
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
$template->pparse('overall_header');
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//---------start mod: Switch Style From URL-------------------------
$sql = 'SELECT themes_id, style_name
			FROM ' . THEMES_TABLE . '
			ORDER BY style_name';
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query themes table', '', __LINE__, __FILE__, $sql);
}
while ( ($row = $db->sql_fetchrow($result)) )
{
	$template->assign_block_vars('ssu_style', array(
		'ID' => intval($row['themes_id']),
		'NAME' => htmlspecialchars($row['style_name']),
		'SELECTED' => isset($GLOBALS['ssu_get']) && (intval($GLOBALS['ssu_get']) == intval($row['themes_id'])) ? ' selected="selected"' : '',
	));
}
$template->assign_vars(array(
	'L_SSU_STYLE' => $lang['Board_style'],
	'L_SSU_GO' => $lang['Go'],
	'L_SSU_DEFAULT' => $lang['color_default'], // erm... well, not a really a color, but who cares ? ;)
	'SSU_VARNAME' => POST_STYLE_URL,
	'U_SSU_BACK' => preg_replace('#((&|&)?' . POST_STYLE_URL . '=[0-9]*)#i', '', append_sid('index')),
));
$db->sql_freeresult($result);
//---------fin mod: Switch Style From URL---------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
# at end of the file
#
		</table>

		<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
<form name="ssu_style" method="get" action="{U_SSU_BACK}"><div class="genmed" style="text-align: right">{L_SSU_STYLE}:&nbsp;<select name="{SSU_VARNAME}">
<option value="0">{L_SSU_DEFAULT}</option>
<!-- BEGIN ssu_style -->
<option value="{ssu_style.ID}"{ssu_style.SELECTED}>{ssu_style.NAME}</option>
<!-- END ssu_style -->
</select>&nbsp;<input type="submit" class="liteoption" value="{L_SSU_GO}" /></div></form>
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

InTimo
Registered User
Posts: 18
Joined: Fri Dec 07, 2007 10:08 pm

Re: Topic Calendar (regular phpBB edition)

Post by InTimo » Fri May 09, 2008 8:50 pm

Thanks, but what does this mean in detail. Should I compare the Code posted by you above with my version ?? Sorry, but my english isn´t so good. I´m german ;) .. Do you speak german ??

What about this .. I haven´t a Checkbox in the Header .. Why now ??

Code: Select all

<form name="ssu_style" method="get" action="{U_SSU_BACK}"><div class="genmed" style="text-align: right">{L_SSU_STYLE}:&nbsp;<select name="{SSU_VARNAME}">
<option value="0">{L_SSU_DEFAULT}</option>
<!-- BEGIN ssu_style -->
<option value="{ssu_style.ID}"{ssu_style.SELECTED}>{ssu_style.NAME}</option>
<!-- END ssu_style -->
</select>&nbsp;<input type="submit" class="liteoption" value="{L_SSU_GO}" /></div></form>
No automatic way

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: Topic Calendar (regular phpBB edition)

Post by Ptirhiik » Fri May 09, 2008 11:38 pm

Actually the code I posted replace entirely the original mod, so you may want to drop the original to install this one. What I have put in page_/overall_header only reflects the test I've done: you can skip this part ;). I didn't look at the styles.* (.php + .html) as you said you didn't use them.

User avatar
gordon@1qi.com
Registered User
Posts: 5
Joined: Thu Nov 15, 2007 3:36 pm

Re: Topic Calendar (regular phpBB edition)

Post by gordon@1qi.com » Sat May 10, 2008 1:11 pm

Hi I am looking to be able to create repetitive events in the calendar Mod. Can this be done?

Thanks

Gordon

InTimo
Registered User
Posts: 18
Joined: Fri Dec 07, 2007 10:08 pm

Re: Topic Calendar (regular phpBB edition)

Post by InTimo » Sun May 11, 2008 3:22 pm

I´m editing the Files yet . .but what means

Code: Select all

   // nb - ptirhiik: when style is on a form (usercp_*), it is always recovered from $HTTP_POST_VARS, never from $HTTP_GET_VARS: we don't need so to check it
??

I´ve made the Changes within the Code above .. and the Calender have the "style=2" extension on http://www.homaer.de/pages/forum.php .. many thanks to you ..

EDIT .. without the Code above in the Session the Anonymous USERS haven´t the long SID Extension in the URLS - I think, it´s so better ;)
Timo

InTimo
Registered User
Posts: 18
Joined: Fri Dec 07, 2007 10:08 pm

Re: Topic Calendar (regular phpBB edition)

Post by InTimo » Mon May 12, 2008 5:54 pm

Today I´ve an SID Extension in the URL in both URLs .. talk.homaer.de / www.homaer.de/pages/forum.php .. when I reload the URLs the ?=sid is away .. how can I fix this ??

Timo

Crissipos
Registered User
Posts: 7
Joined: Tue Sep 18, 2007 10:34 pm

Re: Topic Calendar (regular phpBB edition)

Post by Crissipos » Tue May 13, 2008 5:39 pm

We want a PHPBB3 version! :(

Peter77sx
Registered User
Posts: 3247
Joined: Wed Nov 09, 2005 2:51 pm

Re: Topic Calendar (regular phpBB edition)

Post by Peter77sx » Thu May 15, 2008 2:01 pm

Anyone know of an more efficient way to display the calendar_box? The edit to my page_header.php jumps to some 15-20 extra queries. I can let it slide for index.php, but on my viewtopics and viewforums, it jumps to 50-70 queries. Is there not a way to show the calendar box on just one page, like just for index and not my entire board?

any ideas?

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Re: Topic Calendar (regular phpBB edition)

Post by Ptirhiik » Thu May 15, 2008 7:14 pm

er... I don't know what you did with the mod, but this is not due to the basic version at least: the mod generates one query to get the forums authorised, one query to catch the topics, and one query to catch the depending informations (first post text + author of the first post text). Sorry to ask, but are you sure you are using Topic Calendar ?

Peter77sx
Registered User
Posts: 3247
Joined: Wed Nov 09, 2005 2:51 pm

Re: Topic Calendar (regular phpBB edition)

Post by Peter77sx » Fri May 16, 2008 6:32 am

Yes, I am using Topic Calendar MOD... when I insert the code to go after
header ('Pragma: no-cache'); that's when the queries jump. this is according to Run stats MOD...

I'll keep testing though...

Post Reply

Return to “[2.0.x] MOD Database Releases”

Who is online

Users browsing this forum: No registered users and 9 guests