[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.
igami
Registered User
Posts: 79
Joined: Fri Jun 17, 2005 6:49 pm

Post by igami » Sat Nov 26, 2005 4:27 am

I dont need to assign different types in different forums, but thanks for the tip.

I just want it to work in my 2.018 :D I did removed the line you said to remove, but I am still seeing blanks - not sure if this is even related to that issue.

For me I can only get one topic to show the image and type name all the others are blank (no image no title). I went into sql and all of the topics show the correct type id, so I dont know why they arent displaying correctly in viewforum.

martin_uy
Registered User
Posts: 46
Joined: Sun Oct 16, 2005 5:52 pm
Contact:

Post by martin_uy » Sat Nov 26, 2005 6:00 am

igami wrote: not sure if this is even related to that issue.

No, that is not related to the line I was talking about. If you don't remove the line you can't post any new topic with a specific topic type. However, those already posted are going to remain.

Not sure where is your problem. If you read this whole topic you can find some fix. It's likely your mod was not correctly installed or you didn't update the DB. If you install the 1.0.2 version you will not find major bugs.. I mean, you can use it but it still has some bugs.

igami
Registered User
Posts: 79
Joined: Fri Jun 17, 2005 6:49 pm

Post by igami » Sat Nov 26, 2005 6:11 am

Yes, the sql has been updated, and Im pretty confident that I followed the instructions correctly. I just dont think it works smoothly with phpBB 2.018 ...

The MOD version I downloaded from post #1 is MOD Version : 1.0.1 ...
Where can I obtain 1.0.2 - maybe it works better?

cklimas
Registered User
Posts: 1
Joined: Tue Nov 29, 2005 3:14 pm

Post by cklimas » Tue Nov 29, 2005 4:13 pm

Does somebody know why this mod isn't working with the ca_aphrodite skin? After I switch to that skin all page requests bekcome white (empty).

Has somebody a solution for the problem?

Regards chris.

martin_uy
Registered User
Posts: 46
Joined: Sun Oct 16, 2005 5:52 pm
Contact:

Post by martin_uy » Tue Nov 29, 2005 8:40 pm

igami wrote: I just dont think it works smoothly with phpBB 2.018 ...
Yes, It works on phpbb 2.0.18 but you just have to do the change in the file I said. If you don't believe you can visit my site :lol:
igami wrote: The MOD version I downloaded from post #1 is MOD Version : 1.0.1 ...
Where can I obtain 1.0.2 - maybe it works better?
It's difficult to find version 1.0.2 but I can send it to you by mail. Just give it to me.

Code: Select all

##############################################################
## MOD History :
##
##   28-08-2004 - Version 1.0.2
##      - Fix an error when add a custom icon
##   28-08-2004 - Version 1.0.1 
##      - Replace font by span
##   21-08-2004 - Version 1.0.0 
##      - First Release
################################################################
Martin.

User avatar
James78
Registered User
Posts: 811
Joined: Sat Jul 30, 2005 4:54 pm
Location: Washington, USA
Contact:

Post by James78 » Wed Nov 30, 2005 1:09 am

2.0.18 compatible? At phpbbhacks.com it says this is for 2.0.10. The last one I installed wrecked my forum...

martin_uy
Registered User
Posts: 46
Joined: Sun Oct 16, 2005 5:52 pm
Contact:

Post by martin_uy » Wed Nov 30, 2005 1:51 am

How many times must I say that this mod is phpBB 2.0.18 compatible? :lol: You just have to do 1 modification, remove one line as I said in another post.

Don't believe me? Ok, check http://www.uruguay.com.ru

I did other modifications just to fix some bugs, but they have nothing to do with the phpBB version. Even more, I ran this mod since I had phpBB 2.0.17 and it was 100% working. When I upgraded I corrected one line on the phpBB 2.0.18 and that was all :wink:

User avatar
James78
Registered User
Posts: 811
Joined: Sat Jul 30, 2005 4:54 pm
Location: Washington, USA
Contact:

Post by James78 » Thu Dec 01, 2005 6:57 am

martin_uy wrote: How many times must I say that this mod is phpBB 2.0.18 compatible? :lol: You just have to do 1 modification, remove one line as I said in another post.

Don't believe me? Ok, check http://www.uruguay.com.ru

I did other modifications just to fix some bugs, but they have nothing to do with the phpBB version. Even more, I ran this mod since I had phpBB 2.0.17 and it was 100% working. When I upgraded I corrected one line on the phpBB 2.0.18 and that was all :wink:

The sites not in English, I can't read it.

martin_uy
Registered User
Posts: 46
Joined: Sun Oct 16, 2005 5:52 pm
Contact:

Post by martin_uy » Thu Dec 01, 2005 4:44 pm

James78 wrote: The sites not in English, I can't read it.
Yes I know but what matters is that you can see in the second forum the topic types working (with it's images). And the forum is 2.0.18.

Zoellner
Registered User
Posts: 4
Joined: Tue May 03, 2005 8:50 am

Post by Zoellner » Tue Jan 03, 2006 10:56 am

martin_uy wrote: For example; if you want to add two topics types you will have to edit on posting.php and replace the string we are talking about with this one:

Code: Select all

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, 20, 21 )) ) ? $topic_type : POST_NORMAL;
That's the only way I know how to solve this. I'm pretty sure there is another 'automatic' way; but don't worry the manual way works as it's supposed to work and have no security holes/bugs if you keep it updated with the number of the topic types you have :wink:


This is my solution for an 'automatic' way:

Code: Select all

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

posting.php

#
#-----[ FIND ]---------------------------------------------- 
#  (This is the original line from phpbb 2.0.18!)

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL;

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

// Begin Advanced Topic Type
$all_topic_types = array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE);
$sql_tt = "SELECT * FROM ". TOPIC_ADD_TYPE_TABLE ." ORDER BY topic_type_order DESC";
$result_tt = $db->sql_query($sql_tt);
while( $add_type = $db->sql_fetchrow($result_tt) )
{
    $topic_add_type = intval( $add_type['topic_type_order'] + POST_ADD_TYPE );
 	$all_topic_types[] = $topic_add_type;
}
$topic_type = ( in_array($topic_type, $all_topic_types) ) ? $topic_type : POST_NORMAL;
// End Advanced Topic Type
If there is a better way, please let me know...

Greetings
Marc

martin_uy
Registered User
Posts: 46
Joined: Sun Oct 16, 2005 5:52 pm
Contact:

Post by martin_uy » Tue Jan 03, 2006 6:46 pm

Yeap, I did something similar :)

User avatar
mfrankena
Registered User
Posts: 128
Joined: Sun Apr 17, 2005 3:11 pm

Post by mfrankena » Fri Jan 06, 2006 1:47 pm

ok nice very nice mod.
After that last fix of Zoellner, it works finally. BUT it still is placing the topic on top of thread, when i selected it NOT to in the ACP.

How can i fix that ?

oh and when i select the same image to be used by different new types, it doesn't work. The first one uses the defined image, but the second new type automatically goes to the default image. In the ACP, it DOES accept the image setting, strangely enough.
Any idea?
Regards,
Martin

Sites: BF2CC Admin // 2142CC Admin // M.B.T. Admin // Homepage

User avatar
mfrankena
Registered User
Posts: 128
Joined: Sun Apr 17, 2005 3:11 pm

Post by mfrankena » Mon Jan 16, 2006 7:32 pm

See above question
ANYONE ?????
Regards,
Martin

Sites: BF2CC Admin // 2142CC Admin // M.B.T. Admin // Homepage

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 » Fri Feb 10, 2006 6:12 am

What if I want this to work with the global announcement mod?

For the 2.0.18 update the global announcement forum said to do this line.

Code: Select all

$topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE)) ) ? $topic_type : POST_NORMAL; 
You guys want me to remove it and put this for this mod.

Code: Select all

// Begin Advanced Topic Type
$all_topic_types = array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE);
$sql_tt = "SELECT * FROM ". TOPIC_ADD_TYPE_TABLE ." ORDER BY topic_type_order DESC";
$result_tt = $db->sql_query($sql_tt);
while( $add_type = $db->sql_fetchrow($result_tt) )
{
    $topic_add_type = intval( $add_type['topic_type_order'] + POST_ADD_TYPE );
    $all_topic_types[] = $topic_add_type;
}
$topic_type = ( in_array($topic_type, $all_topic_types) ) ? $topic_type : POST_NORMAL;
// End Advanced Topic Type
I can only manage to make 1 mod work at a time, and if I just put both pieces of code in then only Global Announcements works. What can I do?

Here is the link for the fix for the other mod.
http://mods.db9.dk/viewtopic.php?t=7218

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 » Fri Feb 10, 2006 6:15 am

Nevermind... had to just add "POST_GLOBAL_ANNOUNCE"

This is the new one for anyone else who may have my same problem with the Global Announcement Mod

Code: Select all

// Begin Advanced Topic Type
$all_topic_types = array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE);
$sql_tt = "SELECT * FROM ". TOPIC_ADD_TYPE_TABLE ." ORDER BY topic_type_order DESC";
$result_tt = $db->sql_query($sql_tt);
while( $add_type = $db->sql_fetchrow($result_tt) )
{
    $topic_add_type = intval( $add_type['topic_type_order'] + POST_ADD_TYPE );
    $all_topic_types[] = $topic_add_type;
}
$topic_type = ( in_array($topic_type, $all_topic_types) ) ? $topic_type : POST_NORMAL;
// End Advanced Topic Type

Post Reply

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