[2.0.15] Latest active topics on index

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
80
54%
Very Good
41
28%
Good
14
10%
Fair
7
5%
Poor
5
3%
 
Total votes: 147

User avatar
felguard
Registered User
Posts: 68
Joined: Tue Oct 18, 2005 7:41 am
Contact:

Post by felguard » Thu Mar 09, 2006 12:54 am

Is it just me or the demo doesn't work?

nm:

http://zparta.hispan.se/pics/last_active_topics.jpg
iHeartLED.com - Love Your LED Endlessly

halfwing2
Registered User
Posts: 48
Joined: Wed Feb 22, 2006 5:53 pm
Location: Fairfield, CA
Contact:

Post by halfwing2 » Thu Mar 09, 2006 1:00 pm

This thing is so cool! Image

CLICKY

I had to massage it a little, but it's a very nice piece of work!

Thanks zparta!

s3rro
Registered User
Posts: 107
Joined: Mon Oct 11, 2004 2:36 pm

Post by s3rro » Thu Mar 09, 2006 10:58 pm

Hi,

I ve uploaded all the changed files, I use two styles and I did it for both,
Now on my forum index i see the table for "Last Active Topics" but it is empty, i ve entered new topics to forum but it doesnt show on the "Last Active Topics".

How can i troubleshoot, find where my mistake is? I ve checked codes and files again and everything seems ok.
I used latest topic on index 1-1-9.

Also where do we set the amount of the topics we want to view?




View From SQL

SQL query:
SELECT *
FROM `phpbb_config`
LIMIT 60 , 30


config_name config_value
default_lang english
topics_on_index 10

halfwing2
Registered User
Posts: 48
Joined: Wed Feb 22, 2006 5:53 pm
Location: Fairfield, CA
Contact:

Post by halfwing2 » Thu Mar 09, 2006 11:16 pm

Here's the setting in my General Configuration panel for the number of recent topics displayed:


Image


As far as your information not displaying on the index page, I would re-check my index.php edit.

s3rro
Registered User
Posts: 107
Joined: Mon Oct 11, 2004 2:36 pm

Post by s3rro » Fri Mar 10, 2006 12:18 am

thanks for the image,

Whenever I try to change that value to 5, 10 etc ... and submit it accepts it , but hen i go back to General configuration panel that field is empty again and I still dont have the topics on the forum index.

halfwing2
Registered User
Posts: 48
Joined: Wed Feb 22, 2006 5:53 pm
Location: Fairfield, CA
Contact:

Post by halfwing2 » Fri Mar 10, 2006 12:32 am

s3rro wrote: I still dont have the topics on the forum index.



[disclaimer]
I'm 'prolly too new at this to be giving advice, but I'll try to help if I can to give back a little of what's been done to help me.
[/disclaimer]

Did you edit the template filed manually or use Easymod? It seems like there is something in your template files that isn't right.

I would look at the index_body.tpl in whatever template you are using and make sure that the sql table is defined correctly.

I did this manually in the phpbb data base:
INSERT INTO phpbb_config ( config_name, config_value ) VALUES ('topics_on_index', '10');

s3rro
Registered User
Posts: 107
Joined: Mon Oct 11, 2004 2:36 pm

Post by s3rro » Fri Mar 10, 2006 2:48 am

hi,
i didnt use easy mod - changed the files by myself. Both teplates are giving the same error,

I did manually instert the value and the name to the db.


Image

Image

squat45
Registered User
Posts: 7
Joined: Fri Dec 16, 2005 4:23 pm

Post by squat45 » Fri Mar 10, 2006 3:21 am

Figured out a bit of my problem... seems like the issue is related to the bit in there to restrict view of the recent topics list to only users that can see the forums... take that query section out and everything shows up just fine. Don't know enough about php to really try to debug... I do have CH installed, and the problem might be related. I've checked my permissions and things should be ok?!?!?

Here is the code that I have:
// Get Viewable Forums
//
// function to merge two auth arrays to one
function array_merge_replace($array, $newValues)
{
foreach ($newValues as $key => $value)
{
if ( is_array($value) )
{
if ( !isset($array[$key]) )
{
$array[$key] = array();
}
$array[$key] = array_merge_replace($array[$key], $value);
}
else
{
if ( isset($array[$key]) && is_array($array[$key]) )
{
$array[$key][0] = $value;
}
else
{
if ( isset($array) && !is_array($array) )
{
$temp = $array;
$array = array();
$array[0] = $temp;
}
$array[$key] = $value;
}
}
}
return $array;
}
$ary = array();
$ary2 = array();
$ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
$ary2 = auth(AUTH_READ, AUTH_LIST_ALL, $userdata, $forum_data);
$is_auth_ary = array_merge_replace($ary, $ary2);
$auth_view_forum_sql = '';
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $is_auth_ary[$forum_data[$j]['forum_id']]['auth_read'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
$auth_view_forum_sql .= ($auth_view_forum_sql == '' ? '' : ', ' ) . $forum_data[$j]['forum_id'];
}
}
}
$auth_view_forum_sql = ($auth_view_forum_sql == '' ? '(0)' : '(' . $auth_view_forum_sql . ')');

//
// Get The Data
//
$template->assign_vars(array(
'MARQUEE_TOPIC' => str_replace("%s",$board_config['topics_on_index'],$lang['marquee_topic']) )
);

$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_type, t.topic_status, p.post_id, p.poster_id,
p.post_time, u.user_id, u.username, u.user_lastvisit
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE t.forum_id IN " . $auth_view_forum_sql . " AND t.topic_id = p.topic_id
AND f.forum_id = t.forum_id
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY t.topic_last_post_id DESC";


When I take the red text out it works fine... but then of course everyone can see restricted forums... which I would prefer NOT to happen. Help here would be GREATLY appreciated. :wink:

halfwing2
Registered User
Posts: 48
Joined: Wed Feb 22, 2006 5:53 pm
Location: Fairfield, CA
Contact:

Post by halfwing2 » Fri Mar 10, 2006 5:40 am

It looks like you've got it working except that the restricted forums are visible to the public. Is that correct?

I don't have any restricted forums so I can't offer any input on that issue. However, during my reading before I installed this mod, I remember some discussion early in this thread about your issue.

Check back through and see where that ended up.

squat45
Registered User
Posts: 7
Joined: Fri Dec 16, 2005 4:23 pm

Post by squat45 » Fri Mar 10, 2006 3:32 pm

@Halfwing2:

Correct. It does work except that all forums are visible. I did see a bunch of discussion where CH changes permissions and how they are handled, but I did not see any specifics (as in fixes) and the mod writer mentioned he fixed the problems... I will go through the forum again and see if I can find something more concrete.

And I need to have hidden forums... run a gaming site and there needs to be sections that are visible to only a few, and others visible to all. Since the site is not 100% functional yet, not worried right now... but it is something that I'll need to fix.

Unfortunately I'm new at php... know HTML well, so I'm reading it ok but cannot really figure out where the problem is... especially if it is with permissions...

Thanks.

{wp}ShadowWolf
Registered User
Posts: 21
Joined: Sun Jan 04, 2004 8:50 pm
Contact:

Post by {wp}ShadowWolf » Sat Mar 11, 2006 10:33 am

Hi there :D

Very nice mod!
I´ve installed it at this BB which is heavily modded in the meantime.

I got a little problem. After i´ve read all the new messages, the unread flag still shows unread in the scrollbox at the index.php uuntil i have relogged in. I think this might be a compatibility problem with the [2.0.19] keep unread flags Mod that is also installed at the BB.
Is there a chance to get this work properly?

I´ve also posted a request inside the support-forum of the keep-unread-flag-mod.

Thanks in advance :D

aie
Registered User
Posts: 9
Joined: Tue Mar 07, 2006 6:31 am

Post by aie » Sun Mar 12, 2006 5:28 am

Help!

I'm almost done but trying to find


#-----[ FIND ]------------------------------------------
#
//
// Start output of page
//


in index.php

and totally can't find it at all. Is there something I'm doing wrong???

Shote
Registered User
Posts: 18
Joined: Fri Feb 17, 2006 12:19 am

Post by Shote » Wed Mar 15, 2006 9:50 pm

Hi guys.. i have read 23 pages of this topic.. but I give up.. hope someone can help me..

I have installed it three times.. I see the box in the index but it's empty.. :?

I have read that there are some problems when "Categories hierarchy" mod is installed.. so.. I think it's my problem.. :?

help me please.. and sorry for my english

Thanks

squat45
Registered User
Posts: 7
Joined: Fri Dec 16, 2005 4:23 pm

Post by squat45 » Wed Mar 15, 2006 10:05 pm

Shote, what I did was modify index.php to remove the query lines that restrict some of the topics seen... look in an above post (only a couple above this one) and you can probably modify it and it'll work. Remove the red lines and all should work (in theory).

I'm trying to work myself into figuring out what the heck is going on myself... right now I don't need it working (the part about users only seeing posts they have rights to see), but I will shortly.

Hope that helps.

Shote
Registered User
Posts: 18
Joined: Fri Feb 17, 2006 12:19 am

Post by Shote » Wed Mar 15, 2006 11:01 pm

thanks squat45

its exactly like you said.. it's working already.. but anyone can see all the topics :?

anyone can help us please?

Post Reply

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