Multiple Recent topics blocks

Support for the IM Portal Project

Moderator: Integra Moderator

Multiple Recent topics blocks

PostAuthor: Adrian Rea » Sun Aug 06, 2006 5:42 pm

I have searched around but cannot find this. I thought some have done it before. Is it possible to make several recent topic blocks and have them display the recent topics of specified forums?

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Drop-Forged » Sun Aug 06, 2006 6:37 pm

I had something similar running between two separate sites, each site had its own recent topics and a recent topic block from the other site.

Worked good, except it confused some people, and had a little issue with sessions sometimes becuse the sitename was diferant.

Put that was 2 different boards,

Are you looking for multiple topic blocks on the same board???


That wuold be cool if we could just have it call on the forums we wanted them to.
Last edited by Drop-Forged on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 8:07 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: billsatx » Sat Aug 12, 2006 7:06 am

Adrian..is this what you mean??

Goes in the phpBB2/blocks directory

blocks_imp_recent_topics2.cfg
Code: Select all
<?php/***************************************************************************  *                       blocks_imp_recent_topics.cfg  *                            -------------------  *   begin                ]http]  *   email                : [url=http://www.integramod.com]http://www.integramod.com[/url]  *   email                : <a>webmaster@integramod.com</a>  *  *   note: removing the original copyright is illegal even you have modified  *         the code.  Just append yours if you have modified it.  ***************************************************************************/  /***************************************************************************  *  *   This program is free software; you can redistribute it and/or modify  *   it under the terms of the GNU General Public License as published by  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/  if ( !defined('IN_PHPBB') ){         die("Hacking attempt");}  if(!function_exists(imp_recent_topics2_block_func)){         function imp_recent_topics2_block_func()         {                 global $template, $portal_config, $userdata, $board_config, $db, $phpEx, $var_cache, $lang;                   $forum_data = array();                 if($portal_config['cache_enabled'])                 {                         $forum_data = $var_cache->get('forum', 90000, 'forum');                 }                 if(!$forum_data)                 {                         $sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";                         if (!$result1 = $db->sql_query($sql))                         {                                 message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);                         }                         while( $row1 = $db->sql_fetchrow($result1) )                         {                                 $forum_data[] = $row1;                         }                         if($portal_config['cache_enabled'])                         {                                 $var_cache->save($forum_data, 'forum', 'forum');                         }                 }                   $is_auth_ary = array();                 $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);                   if( $portal_config['md_except_forum_id2'] == '' )                 {                         $except_forum_id = ''start'';                 }                 else                 {                         $except_forum_id = $portal_config['md_except_forum_id2'];                 }                   for ($i = 0; $i <count>sql_query($sql))                 {                         message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);                 }                 $number_recent_topics = $db->sql_numrows($result1);                 $recent_topic_row = array();                 while ($row1 = $db->sql_fetchrow($result1))                 {                         $recent_topic_row[] = $row1;                 }                   if($portal_config['md_recent_topics_style2']){                         $style_row = 'scroll';                 }else                 {                         $style_row = 'static';                 }                   $template->assign_block_vars($style_row,"");                   for ($i = 0; $i <number_recent_topics>assign_block_vars($style_row . '.recent_topic_row', array(                                         'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],                                         'L_TITLE' => smilies_pass($recent_topic_row[$i]['topic_title']),                                         'L_BY' => $lang['By'],                                         'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),                                         'S_POSTER' => $recent_topic_row[$i]['username'],                                         'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])                                         )                                 );                         }                         else {                                 $template->assign_block_vars($style_row . '.recent_topic_row2', array(                                         'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],                                         'L_TITLE' => smilies_pass($recent_topic_row[$i]['topic_title']),                                         'L_BY' => $lang['By'],                                         'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),                                         'S_POSTER' => $recent_topic_row[$i]['post_username'],                                         'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])                                         )                                 );                         }                 }         }}  imp_recent_topics2_block_func();?>


Goes in the phpBB2/templates/yourtemplate/blocks/ directory
recent_topics2_block.tpl
Code: Select all
<table><tr><td><span><BEGIN><marquee><BEGIN>&raquo; <a><b>{scroll.recent_topic_row.L_TITLE}</b></a><br>by <a>{scroll.recent_topic_row.S_POSTER}</a> on {scroll.recent_topic_row.S_POSTTIME}<br><br><END></marquee><END><BEGIN><BEGIN>&raquo; <a><b>{static.recent_topic_row.L_TITLE}</b></a><br>by <a>{static.recent_topic_row.S_POSTER}</a> on {static.recent_topic_row.S_POSTTIME}<br><br><END><END></span></td></tr></table>


Then in the IM Portal config menu decide which forums for that recent topics. I have topics, topics2, topics3, topics4

Just redo above file and replace with the correct 2, 3, 4, 5 etc etc
Last edited by billsatx on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

billsatx
Members
Members
 
Posts: 36
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 21, 2006 9:38 am
Cash on hand: 0.00

PostAuthor: Adrian Rea » Sat Aug 12, 2006 7:44 am

Thanks Bill, That is exactly what I meant. [flash=,:2naniwiw]http://integramod.com/forum/images/icon/icon14.gif[/flash:2naniwiw]


A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: billsatx » Sat Aug 12, 2006 8:05 am

Just FYI...sure you know, but for others who may not be as knowledgeable...it takes more than just renaming the files 2, 3, 4 etc. Within the files there are several references to recent_topics that must be renamed recent_topics2 and so forth.

If you compare the recent_topics and recent_topics2 it pretty easy to spot the changes.

Thus just make the next set of blocks recent_topics3 and so on.
Last edited by billsatx on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

billsatx
Members
Members
 
Posts: 36
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 21, 2006 9:38 am
Cash on hand: 0.00

PostAuthor: Adrian Rea » Sat Aug 12, 2006 8:08 am

Indeed, Nice follow up. <img>

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: billsatx » Sat Aug 12, 2006 9:17 am

Adrian...here is the link for the tutorial...

http://integramod.com/forum/kb.php?mode ... 2cab4cfbbe

I knew it was somewhere....
Last edited by billsatx on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

billsatx
Members
Members
 
Posts: 36
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 21, 2006 9:38 am
Cash on hand: 0.00

PostAuthor: Adrian Rea » Sat Aug 12, 2006 9:28 am

Well, it just goes to show that even I miss the odd item :D
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: evolver » Sat Aug 12, 2006 2:18 pm

"billsatx";p="13565" wrote:Within the files there are several references to recent_topics that must be renamed recent_topics2 and so forth.

If you compare the recent_topics and recent_topics2 it pretty easy to spot the changes.

Thus just make the next set of blocks recent_topics3 and so on.

There is more to change than you did...

Every instance of recent_topic_row has to be changed as well
If you don't, you won't be able to set the right amount of topics to display in a specific block...

And I guess the same has to be done for the scroll and static (style_row), and for the except_forum_id if you want it to be different on different blocks... <img>
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Multiple Recent topics blocks

PostAuthor: billsatx » Sat Aug 12, 2006 11:04 pm

Yes, as I said referenced comparing the two recent_topics vs recent_topics2. The attachements were originally so a person could compare. After I posted the tutorial, I figured better to read that than continue with eplaining.

The example posted works on several boards I have..

Thanks
Last edited by billsatx on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

billsatx
Members
Members
 
Posts: 36
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 21, 2006 9:38 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: evolver » Mon Aug 14, 2006 5:09 pm

"billsatx";p="13596" wrote:Yes, as I said referenced comparing the two recent_topics vs recent_topics2. The attachements were originally so a person could compare. After I posted the tutorial, I figured better to read that than continue with eplaining.

The example posted works on several boards I have..

Thanks

Sorry billsatx, I'm not complaining...
I have to thank you for helping us on the right way...

I'm working on a fully automated solution for this...and I have figured out how...
I will create an .exe file for cloning the recent_topics_block files with the right filenames and replaced code...
The .exe file will only ask for a name (or number) and do the rest by itself...

I will post it soon... <img> (one of the next days)
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: Unregistered » Tue Aug 15, 2006 5:28 am

how abt a random picture block from a selected topic?
Last edited by Unregistered on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
J O N H | P L A Y E R

Unregistered
Sr Integra Member
Sr Integra Member
 
Posts: 254
Likes: 0 post
Liked in: 0 post
Joined: Wed Jun 07, 2006 2:51 pm
Cash on hand: 0.00

PostAuthor: evolver » Thu Aug 17, 2006 5:34 pm

"Unregistered";p="13697" wrote:how abt a random picture block from a selected topic?

I will try making more multiple blocks possible...

But for now, I have made a little tool to make it very easy with just a few mouseclicks to generate Recent_Topic_Blocks...

I hope you like it...

EDIT: I have it updated and uploaded:
You do not have the required permissions to view the files attached to this post.
Last edited by evolver on Mon Dec 11, 2006 11:08 am, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Multiple Recent topics blocks

PostAuthor: evolver » Sun Aug 20, 2006 11:43 pm

Could someone please check this out,
and place it in the downloadsection if it's OK?
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Multiple Recent topics blocks

PostAuthor: computerz » Fri Nov 17, 2006 1:57 am

"evolver";p="13879" wrote:Could someone please check this out,
and place it in the downloadsection if it's OK?


Could you draw up a text file explaining how to use it.
Last edited by computerz on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

computerz
Members
Members
 
Posts: 84
Likes: 0 post
Liked in: 0 post
Joined: Sun Aug 27, 2006 2:21 pm
Cash on hand: 0.00

PostAuthor: sanji » Mon Dec 11, 2006 7:39 am

I have downloaded the small exe made by evolver. There are two issues: first, when you type the name you want to use for the new block, only "M" are displayed - but the name is saved properly. For example, if you want to name your new block "test", it will be written "MMMM" when you try to type that word, although the block's file will be properly named... So just a small issue.

In my case, however, after uploading the 3 files, I can select the new block (recent topics test), but can not get any parameter for that block (I can not select the forums id nor the number of posts I want to display).

Where am I wrong?

Thanks,m

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

PostAuthor: evolver » Mon Dec 11, 2006 11:19 am

"sanji";p="18273" wrote:I have downloaded the small exe made by evolver. There are two issues: first, when you type the name you want to use for the new block, only "M" are displayed - but the name is saved properly. For example, if you want to name your new block "test", it will be written "MMMM" when you try to type that word, although the block's file will be properly named... So just a small issue.

I have downloaded and checked, you are correct...
That was an error that I corrected, but I guess that I uploaded the one with the error by accident :oops:
I've replaced it with the corrected one and downloaded that one myself again to doublecheck it...
I'm sure, it's the corrected one now. :wink:
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: sanji » Mon Dec 11, 2006 7:16 pm

OK, I could manage the configuration, I only didn't know that you first have to activate the block before being able to change the options.

But there is still a problem: the option "Show not" (tick, if listed forums is not to be shown [ recent topics block ]) is NOT available for the newly created block. All other parameters can be changed but this one...

Any idea?

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

PostAuthor: evolver » Tue Dec 12, 2006 2:21 am

"sanji";p="18310" wrote:the option "Show not" (tick, if listed forums is not to be shown [ recent topics block ]) is NOT available for the newly created block. All other parameters can be changed but this one...

Any idea?

sanji

The option "Exceptional Forum ID(s)" should be there for each 'recent topics block'.
Check again...
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: sanji » Tue Dec 12, 2006 2:38 am

The option "Exceptional Forum ID(s)" is there, but not the option "Show not" (tick, if listed forums is not to be shown [ recent topics block ]). There is only 1 "Show not" available, for the original recent topic block.

Why am I so interested in it?

If you check my portal (see signature), you will see that I defined 2 recent topic blocks.

The first one is the normal one, defined for "Exceptional Forums" 38,35,30,21,36,40.
The second one as exactly the same options as the first one, but with "Exceptional Forums" 1,2,3,4,5,7,8,9 and only 3 topics shown.

Still... The same posts are displayed, although they obviously are not on the forums with id's 1,2,3,4,5,7,8,9. No idea why...

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

PostAuthor: evolver » Tue Dec 12, 2006 5:40 am

"sanji";p="18319" wrote:The first one is the normal one, defined for "Exceptional Forums" 38,35,30,21,36,40.
The second one as exactly the same options as the first one, but with "Exceptional Forums" 1,2,3,4,5,7,8,9 and only 3 topics shown.

Still... The same posts are displayed, although they obviously are not on the forums with id's 1,2,3,4,5,7,8,9. No idea why...

sanji

Here is why:

Exceptional Forums are the ones that are NOT to be displayed!!!!
All (allowed) forums will be displayed in the recent topics blocks except the ones you define in "Exceptional Forums"

So in your case:
The first one will NOT display Forums 38,35,30,21,36,40
The second one will NOT display Forums 1,2,3,4,5,7,8,9
Then ofcourse, posts that are not on Forums 1,2,3,4,5,7,8,9,38,35,30,21,36,40 will be displayed on both.

It's just a little misunderstanding... :grin:
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: sanji » Tue Dec 12, 2006 6:46 am

I really have problems with that...

In my first AND second blocks, ALL messages are from forum 40, which is an "Exceptional Forum" for the first block, but not for the second block ?!

In the ACP, I see the following option for the first - and only the first - block:

Code: Select all
Show not ]  


So I guess that if the box is not ticked, you should list the forum from which the posts should be taken, correct? But then, why blocks 1 and 2 have completely different behaviour??


Obviously, there are some strange things going on...
I then changed the parameters (they are still active that way now) to the following:

The first one is the normal block, defined for "Exceptional Forums" 38,35,30,21,36,40.
The second one has exactly the same options as the first one, including the SAME "Exceptional Forums" 38,35,30,21,36,40.

Well, the result is clear: First block takes messages FROM the listed forums, while second block takes messages OUTSIDE the listed forums...

There must be a problem, no?

Thanks for your time evolver,

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: evolver » Tue Dec 12, 2006 9:08 am

Now I am confused... :?:
I do not see anything like that... <img>

This is how it looks like (Portal Configuration) on my testsite:
[flash=,:kfgtnnm6]http://www.stelplaats.be/recentconfig1.jpg[/flash:kfgtnnm6]
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Multiple Recent topics blocks

PostAuthor: sanji » Tue Dec 12, 2006 3:51 pm

OK, now this is weird...

Here is a screenshot of my ACP...

[flash=,:15zz62p2]http://www.sogival.com/japan/ss.jpg[/flash:15zz62p2]

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: evolver » Tue Dec 12, 2006 5:10 pm

On what version is that?

I used it on my 141 testsite, but I checked it on my 140 site now...
Can't find this "Show not" anywhere...

I don't know where it commes from...
Maybe someone else knows???

Or did you add it with an extra MOD there?
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

PostAuthor: sanji » Tue Dec 12, 2006 8:42 pm

Sorry evolver,

(probably) my mistake. I downloaded again the full 1.4.0 package, and compared the files related to that block with the file created by the exe file.

Indeed, there were some small differences. I can not remember where those differences come from; could be a MOD that touched those files, but I do not remember editing them... After uploading again the original files, and suppressing the extra entry in the portal_config database, things started to behave the way you said they will.

I wonder if I did not try to install something to select which forum the recent topics should be taken from, rather than excluding some forums. But again, I do not remember which MOD was involved.

Anyway, this is now solved. The procedure is working and is an extremely valuable modification for the portal page.

Thanks for your long explanations, which allowed me to focus on the origin of the problem.

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

PostAuthor: goodgad » Sat Dec 16, 2006 10:19 am

this is fabulous evolver works brilliantly - just what i was looking for. great tool thx sooo........ much
Last edited by goodgad on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

goodgad
Newbie
Newbie
 
Posts: 19
Likes: 0 post
Liked in: 0 post
Joined: Sat Oct 28, 2006 8:25 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Drop-Forged » Fri Feb 16, 2007 12:24 pm

Is the download corrupted???

It is only 23k for me, and I cant unzip it. <img>
Last edited by Drop-Forged on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 8:07 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Drop-Forged » Fri Feb 16, 2007 9:06 pm

Also, I have this working, but it will only allow me to put 88 Exceptional Forums IDs, my board has over 280 forums, so I would need to expand that field.

Does anyone know how I would do this??? <img>
Last edited by Drop-Forged on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 8:07 pm
Cash on hand: 0.00

PostAuthor: tekguru » Sat Feb 17, 2007 12:56 am

Just tried downloading and I only get a 20.5Kb file?
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

PostAuthor: sanji » Sat Feb 17, 2007 6:17 pm

Same problem here. The download files is, indeed, corrupted. Sorry, I checked, I do not have the original file anymore on my HD...

sanji
Last edited by sanji on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[img]http://www.secret-japan.com/forum/images/banners/fuji%20secret-japan%2088x31.gif[/img] [url=http]Secret Japan[/url] : discover Japan off the beaten tracks

sanji
Sr Integra Member
Sr Integra Member
 
Posts: 291
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 9:18 pm
Cash on hand: 0.00

PostAuthor: tekguru » Sun Feb 18, 2007 1:59 am

Damn, does anyone have the file at all?
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Helter » Sun Feb 18, 2007 10:50 am

Im sorry, but evolvers file does not exist. I have been through the files folder and every file backup with a fine tooth comb. Im assuming he uploaded the last file when we were having ftp issues.
Last edited by Helter on Sun Feb 18, 2007 3:02 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

PostAuthor: tekguru » Sun Feb 18, 2007 2:56 pm

Oh well so it looks like we are stuck for an easy solution unless of course some other kind user has downloaded the file and has a copy that can be reuploaded.

Guys?
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Ezra » Sun Feb 18, 2007 3:38 pm

Ezra to the rescue!!! <img> I got the file and will attach it to this post.

[color=blue]Edit][hr:37gxnpb5]It's an earlier version, so there's just one problem that was described earlier in this topic by "sanji". He wrote the following:

"I have downloaded the small exe made by evolver. There are two issues: first, when you type the name you want to use for the new block, only "M" are displayed - but the name is saved properly. For example, if you want to name your new block "test", it will be written "MMMM" when you try to type that word, although the block's file will be properly named... So just a small issue."

So, it will work like it should. Oh, and for other issues with this you have to read the rest of this topic, because everything works fine.

Greetings,
Ezra
Last edited by Ezra on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Ezra
Newbie
Newbie
 
Posts: 25
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 03, 2006 2:15 pm
Cash on hand: 0.00

PostAuthor: tekguru » Sun Feb 18, 2007 3:41 pm

Ezra is our hero. Hmm you can try to upload into the file upoad area?

PM on the way anyway! <img>
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: tekguru » Tue Feb 20, 2007 12:16 am

Well thanks to Ezra I now have the second recent topics block in position - very much apprecaited, but if possible I'd like to modify the routine but my PHP is not good enough to handle it.....

The idea of the second block is that we can use it to display the last 60 reviews posted in a forum so what we want to do is to retrieve the link to the first post in each thread and then display them backwards time wise, so we can say display the last 30 reviews. That is:

* Most recent review posting
* ...
* ...
* Oldest review

Is this possible at all?

The block as standard looks like this:

Code: Select all
<?php/***************************************************************************  *                        blocks_imp_recents_topic.php  *                            -------------------  *   begin                : Saturday, March 20, 2004  *   copyright            : (C) 2004 masterdavid - Ronald John David  *   website              : [url=http://www.integramod.com]http://www.integramod.com[/url]  *   email                : <a>webmaster@integramod.com</a>  *  *   note: removing the original copyright is illegal even you have modified  *         the code.  Just append yours if you have modified it.  ***************************************************************************/  /***************************************************************************  *  *   This program is free software; you can redistribute it and/or modify  *   it under the terms of the GNU General Public License as published by  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/  if ( !defined('IN_PHPBB') ){     die("Hacking attempt");}  if(!function_exists(imp_recent_topics_Revie_block_func)){     function imp_recent_topics_Revie_block_func()     {         global $template, $portal_config, $userdata, $board_config, $db, $phpEx, $var_cache, $lang;           $forum_data = array();         if($portal_config['cache_enabled'])         {             $forum_data = $var_cache->get('forum', 90000, 'forum');           }         if(!$forum_data)         {             $sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";             if (!$result1 = $db->sql_query($sql))             {                 message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);             }             while( $row1 = $db->sql_fetchrow($result1) )             {                 $forum_data[] = $row1;             }             if($portal_config['cache_enabled'])             {                 $var_cache->save($forum_data, 'forum', 'forum');             }         }           $is_auth_ary = array();         $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);           if( $portal_config['md_except_forum_id_Revie'] == '' )         {             $except_forum_id = ''start'';         }         else         {             $except_forum_id = $portal_config['md_except_forum_id_Revie'];         }           for ($i = 0; $i <count>sql_query($sql))         {             message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);         }         $number_recent_topics_Revie = $db->sql_numrows($result1);         $recent_topic_Revie_row = array();         while ($row1 = $db->sql_fetchrow($result1))         {             $recent_topic_Revie_row[] = $row1;         }           if($portal_config['md_recent_topics_Revie_style']){             $style_row = 'scroll_Revie';         }else         {             $style_row = 'static_Revie';         }           $template->assign_block_vars($style_row,"");           for ($i = 0; $i <number_recent_topics_Revie>assign_block_vars($style_row . '.recent_topic_Revie_row', array(                     'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_Revie_row[$i]['post_id']) . '#' .$recent_topic_Revie_row[$i]['post_id'],                     'L_TITLE' => smilies_pass($recent_topic_Revie_row[$i]['topic_title']),                     'L_BY' => $lang['By'],                     'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_Revie_row[$i]['user_id']),                     'S_POSTER' => $recent_topic_Revie_row[$i]['username'],                     'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_Revie_row[$i]['post_time'], $board_config['board_timezone'])                     )                 );             }             else {                 $template->assign_block_vars($style_row . '.recent_topic_Revie_row', array(                     'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_Revie_row[$i]['post_id']) . '#' .$recent_topic_Revie_row[$i]['post_id'],                     'L_TITLE' => smilies_pass($recent_topic_Revie_row[$i]['topic_title']),                     'L_BY' => $lang['By'],                     'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_Revie_row[$i]['user_id']),                     'S_POSTER' => $recent_topic_Revie_row[$i]['post_username'],                     'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_Revie_row[$i]['post_time'], $board_config['board_timezone'])                     )                 );             }         }     }}  imp_recent_topics_Revie_block_func();?>


Hope someone can help!
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Teelk » Tue Feb 20, 2007 11:45 pm

change...

ORDER BY p.post_time DESC

to...

ORDER BY p.post_time ASC

change both occurances to be sure.
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada

Re: Multiple Recent topics blocks

PostAuthor: Drop-Forged » Wed Feb 21, 2007 2:05 am

Sorry to bring this up again, but does anyone know how to increase the number of Exceptional Forum Ids so I can have over 88??? <img>
Last edited by Drop-Forged on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 8:07 pm
Cash on hand: 0.00

PostAuthor: tekguru » Wed Feb 21, 2007 12:18 pm

Teelk that just reverses the list based on the daet of the last posted topic, we're loocking to base the date on the original seed message of the topic so that we get the most recently posted review first.

We're not interested in the date based on subsequent posts replying to the original review.
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: Teelk » Fri Feb 23, 2007 12:00 am

"tekguru";p="22223" wrote:Teelk that just reverses the list based on the daet of the last posted topic, we're loocking to base the date on the original seed message of the topic so that we get the most recently posted review first.

We're not interested in the date based on subsequent posts replying to the original review.
Ah, ok. Try chaging those line to...

ORDER BY t.topic_time DESC

instead...
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada

PostAuthor: tekguru » Fri Feb 23, 2007 9:04 am

Teelk you are a wonder that has done it - pretty sure it has anyway - it looks right - thanks a million!
Last edited by tekguru on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 11:29 pm
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: bigtime » Sun May 27, 2007 9:58 am

Hi guys

Where can I find this file?

the standard recent topics block shows ALL recent topics - even ones in hidden forums....Id like a way to disallow it from showing any topics in a certain forum.

I found a .zip called recent_articles.zip in the downloads - not sure if thisis it....but it doesnt work for me - get a mass ton of errors on the default portal.php

It DOES make mention of:
Make sure you add your portal config variables in the acp.

Whatever that is supposed to mean....if this is the bottom line issue can someone decribe in more detail what is suppsoed to be happening in ACP??

Or perhaps someone can help me with a quick hack to exclude a certain forum from display?
Last edited by bigtime on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

bigtime
Newbie
Newbie
 
Posts: 1
Likes: 0 post
Liked in: 0 post
Joined: Sun May 27, 2007 9:30 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: evolver » Sun Feb 10, 2008 9:17 am

Hi,

For those who are still looking for the RecentTopicBlock Generator:
[url=http]Download[/url] <img>
Last edited by evolver on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
ImageAlways remember you're unique, just like everyone else.
We are born naked, wet and hungry. Then things get worse.
Don't take life too seriously, you won't get out alive.
User avatar
evolver
Sr Integra Member
Sr Integra Member
 
Posts: 420
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 1:46 pm
Cash on hand: 0.00
Location: Oostende

Re: Multiple Recent topics blocks

PostAuthor: sarkimas » Mon Apr 28, 2008 4:43 am

hi .i want to show only exact forum ,like forum id 1,2,3 .Other forums wont show at my ''recent topics block '' how could i do this .its so important for me because i have made a rss block like this but it has occured some errors like null/empty blocks ..
Last edited by sarkimas on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

sarkimas
Newbie
Newbie
 
Posts: 8
Likes: 0 post
Liked in: 0 post
Joined: Thu Mar 27, 2008 4:37 am
Cash on hand: 0.00

Re: Multiple Recent topics blocks

PostAuthor: sarkimas » Wed May 07, 2008 3:08 am

hi guys ,any idea about this issue :D.it might be more easy then java <img>
Last edited by sarkimas on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

sarkimas
Newbie
Newbie
 
Posts: 8
Likes: 0 post
Liked in: 0 post
Joined: Thu Mar 27, 2008 4:37 am
Cash on hand: 0.00


Return to IM Portal Support Forum

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]