[RC] Advanced Topic Type

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Post by Poupoune »

Try this :
#
#-----[ OPEN ]----------------------------------------------
#

viewforum.php

#-----[ FIND ]----------------------------------------------
#

$sql = "SELECT t.*, t1.topic_type_color AS announce_color,

#
#-----[ IN-LINE FIND ]----------------------------------------------
#

t2.topic_type_color AS sticky_color

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#

, th.template_name AS template_name

#
#-----[ IN-LINE FIND ]----------------------------------------------
#

, ". TOPIC_ADD_TYPE_TABLE ." t2

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#

, ". THEMES_TABLE ." th

#
#-----[ IN-LINE FIND ]----------------------------------------------
#

AND t2.topic_type_name = 'sticky'";

#
#-----[ IN-LINE REPLACE WITH ]----------------------------------------------
#

AND t2.topic_type_name = 'sticky'
AND th.themes_id = ". ( ( $board_config['override_user_style'] ) ? $board_config['default_style'] : $userdata['user_style'] ) ;

#-----[ FIND ]----------------------------------------------
#

$row[] = $tt_row;

#
#-----[ AFTER, ADD ]----------------------------------------------
#

$template_name = $tt_row['template_name'];


#-----[ FIND ]----------------------------------------------
#

$folder = $row[$j]['topic_type_image'];
$folder_new = $row[$j]['topic_type_image_new'];

#
#-----[ REPLACE WITH ]----------------------------------------------
#

$folder = 'templates/'.$template_name.'/images/'.$row[$i]['topic_type_image'];
$folder_new = $row['template_name'].'images'.$row[$i]['topic_type_image_new'];

#
#-----[ OPEN ]----------------------------------------------
#

language/lang_english/lang_main.php

#-----[ FIND ]----------------------------------------------
#

$lang['topic_type_folder'] = 'Topic type image ( phpBB path )';

#
#-----[ REPLACE WITH ]----------------------------------------------
#

$lang['topic_type_folder'] = 'Topic type image';


Then with this in the ACP you will have to enter only the name of the file.
Ex: icon.gif and not templates/XXX/images/test.gif
The image will have to be in the images/ folder of each template installed on the forum.
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 »

Small problem:

Code: Select all

#-----[ IN-LINE FIND ]----------------------------------------------
#

topic_type = $topic_type

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#

 $topic_type_active,    
Missin a ,

Anyways do u know how to get this mod to work with the annouces suite and topic tilte as weblink mod
Whos missing up my sig?
Zypher
Registered User
Posts: 381
Joined: Fri Mar 12, 2004 7:04 am
Location: Australia
Contact:

Post by Zypher »

well I am trying to install it but havent have the time to. But it is the short of mod that I need. Curious can you search using type?
- Zypher

~Beware of the Darkness Within!~

Fully Loaded
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Post by Poupoune »

Zypher wrote: well I am trying to install it but havent have the time to. But it is the short of mod that I need. Curious can you search using type?

No, but maybe on a future release :wink: .
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Post by Poupoune »

Shof515 wrote: Small problem:

Code: Select all

#-----[ IN-LINE FIND ]----------------------------------------------
#

topic_type = $topic_type

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#

 $topic_type_active,    
Missin a ,

Anyways do u know how to get this mod to work with the annouces suite and topic tilte as weblink mod

No it's not missing that's the way it is :wink: .
I don't about compliances with those MODs, I'll try.
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 »

Shof515 wrote: Anyways do u know how to get this mod to work with the annouces suite and topic tilte as weblink mod

got an idea
Whos missing up my sig?
encryption
Registered User
Posts: 392
Joined: Tue Jul 08, 2003 2:07 pm
Contact:

Mod....

Post by encryption »

EXCELLENT mod, I could DEFINITELY use something like this on my forums, however I'm just curious, how will I get this to work with Ptirhiik's PCP (Profile Control Panel) Mod Or even a heavily modded board ??

-e-
maxJackal
Registered User
Posts: 62
Joined: Thu Mar 13, 2003 10:22 pm
Location: Turkey / 26
Contact:

Post by maxJackal »

nice MOD:)
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Re: Mod....

Post by Poupoune »

encryption wrote: EXCELLENT mod, I could DEFINITELY use something like this on my forums, however I'm just curious, how will I get this to work with Ptirhiik's PCP (Profile Control Panel) Mod Or even a heavily modded board ??

-e-

Tested with PCP, seemed to have no problem with it :wink: .
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
ultima528
Registered User
Posts: 100
Joined: Tue Apr 06, 2004 8:24 pm

Post by ultima528 »

If it could be made to work with Announces Suite and Categories Heirarchy (both by Ptirhiik), I would definitely try this MOD.

Great job so far =)
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Post by Poupoune »

ultima528 wrote: If it could be made to work with Announces Suite and Categories Heirarchy (both by Ptirhiik), I would definitely try this MOD.

Great job so far =)

It works with CH, didn't try with Announces Suite, I'll let you know :wink: .
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Post by Poupoune »

Here's for Split Topic Type by Ptirhiik compliance :
#
#-----[ OPEN ]----------------------------------------------
#

includes/functions_topic_list.php

#-----[ FIND ]----------------------------------------------
#

// display topics

#
#-----[ AFTER, ADD ]----------------------------------------------
#

$sql = "SELECT t.*, t1.topic_type_color AS announce_color, t2.topic_type_color AS sticky_color, th.template_name AS template_name
FROM ". TOPIC_ADD_TYPE_TABLE ." t,". TOPIC_ADD_TYPE_TABLE ." t1, ". TOPIC_ADD_TYPE_TABLE ." t2, ". THEMES_TABLE ." th
WHERE t1.topic_type_name = 'announce'
AND t2.topic_type_name = 'sticky'
AND th.themes_id = ". ( ( $board_config['override_user_style'] ) ? $board_config['default_style'] : $userdata['user_style'] ) ;

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
while ($tt_row = $db->sql_fetchrow($result))
{
$row[] = $tt_row;
$template_name = $tt_row['template_name'];
$announce_color = '#'.$tt_row['announce_color'];
$sticky_color = '#'.$tt_row['sticky_color'];
}

#-----[ FIND ]----------------------------------------------
#

else if( $topic_type == POST_STICKY )
{
$topic_type = '<span style="color:'. $sticky_color .'">'. $lang['Topic_Sticky'] . ' </span>';
}

#
#-----[ AFTER, ADD ]----------------------------------------------
#

else if( $topic_type > POST_GLOBAL_ANNOUNCE )
{
for($j = 0; $j < count($row); $j++ )
{
if( intval($topic_rowset[$i]['topic_type'] - POST_ADD_TYPE) == $row[$j]['topic_type_order'] )
{
$topic_type = '<span style="color:#'. $row[$j]['topic_type_color'] .'">'. $row[$j]['topic_type_name'] .':</span> ';
}
}
}

#-----[ FIND ]----------------------------------------------
#

else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
{
$folder = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_sticky_own'] : $images['folder_sticky'];
$folder_new = ($user_replied && defined('USER_REPLIED_ICON')) ? $images['folder_sticky_new_own'] : $images['folder_sticky_new'];
}

#
#-----[ AFTER, ADD ]----------------------------------------------
#

else if( $topic_rowset[$i]['topic_type'] > POST_ADD_TYPE )
{
if( $row[$i]['topic_type_image'] != '' )
{
$folder = 'templates/'.$template_name.'/images/'.$row[$i]['topic_type_image'];
$folder_new = $row['template_name'].'images'.$row[$i]['topic_type_image_new'];
}
else
{
$folder = $images['folder_topic_type'];
$folder_new = $images['folder_topic_type_new'];
}
}

#-----[ FIND ]----------------------------------------------
#

$template->assign_block_vars($tpl . '.row', array(

#
#-----[ BEFORE, ADD ]----------------------------------------------
#

if( $topic_real_type > POST_GLOBAL_ANNOUNCE )
{
for($j = 0; $j < count($row); $j++ )
{
if( intval($topic_rowset[$i]['topic_type'] - POST_ADD_TYPE) == $row[$j]['topic_type_order'] )
{
$sub_title = '<span style="color:#'. $row[$j]['topic_type_color'] .'">'. $row[$j]['topic_type_name'] .':</span> ';
}
}
}

A known issue is that when you select a topic type as normal topic type in the ACP, it is still split in viewforum. I'll correct that later :) .
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
bcs10
Registered User
Posts: 1525
Joined: Mon Jul 14, 2003 4:45 am
Location: Chicago, IL

Post by bcs10 »

interesting MOD... i might use it once it comes out of beta testing
/DD
ekimN
Registered User
Posts: 13
Joined: Sun Mar 21, 2004 5:25 am

Post by ekimN »

Nice mod.. got it to work on phpbb 2.0.10, however I don't think it works well with the Topic Cement mod. After installing the Advanced Topic type, I can't prioritze topics. Is there a fix with this? Thanks!
holek
Registered User
Posts: 47
Joined: Sat Aug 09, 2003 11:35 am
Location: Wroclaw, Poland
Contact:

Post by holek »

Is this mod workin' with Global Announce MOD?

BTW: I've created polish version of this mod:
http://phpbb.pl/download.php?d=247

Click on: Pobierz
P.S. Sorry for my horrible English :(
Messengers: [ Gadu-Gadu: 1658223 ]
My GTA VC Stats
Post Reply

Return to “[2.0.x] MODs in Development”