- Is it posible to allow/disallow/select forums for "The 5 latest posts"?
- Is it posible to allow/disallow/select forums for "The 5 latest topics"?
- Might it possible to have the menu allways on the right site, even while browsing the forum?
Un1
The two first. Sure no problem. This is a must for any mod with features like this imo.Unimatrix_0 wrote:Sorry if I ask questions that have been asked befor, but I have a few:
best regards
- Is it posible to allow/disallow/select forums for "The 5 latest posts"?
- Is it posible to allow/disallow/select forums for "The 5 latest topics"?
- Might it possible to have the menu allways on the right site, even while browsing the forum?
Un1
Code: Select all
$excluded_forums = array('13','16');
Code: Select all
$excluded_forums = array('FORUM_ID','FORUM_ID2');
Without more info no. But why not use a existing page and add your stuff to that, Then all the basic functions of this mod will be there, plus the extra you add.sleevedbiker wrote:i created another page onto this BUT, i cant get tables to work in it... i am trying to get this to work on the new page.... any help with this?
If you wish to have it working for non javascript users (Btw as far as i know 99% of most user has it on)onehundredandtwo wrote:This is a great MOD, but users without Javascript cannot use it.
I haven't looked at the code, but if you have all of the folders expanded by default, and then use <body onload="yourfunctionhere()"> to collapse these when loaded with Javascript, then users without Javascript will be able to use the links.
Keep up the good work, DoYouSpeakWak.
You dont have to change the index.php, just replace the html that shows this with the html code posted by stoker. As long as you have a backup of the file nothing can go wrong.jsmoke222000 wrote:Ok guys, I have been hard @ work trying to get the last 10 posts to display correctly just like they would look if they were on the displayed on the forum. I am a noob at php & I'm sure that I have multiple things wrong with my code. Can someone look this over & help me clean it up. Trust me when I tell you I have no clue how I made it this far without destroying my board.![]()
index.phpmain.htmlCode: Select all
// Latest posts $forum_array = array_unique(array_keys($auth->acl_getf('!f_read', true))); // we have auths, change the sql query below $sql_and = ''; if (sizeof($forum_array)) { $sql_and = ' AND ' . $db->sql_in_set('p.forum_id', $forum_array, true); } $sql_ary = array( 'SELECT' => 'MAX(p.post_time) as post_time, f.forum_name, p.post_text, u.user_id, u.username, u.user_colour, t.topic_views, t.topic_replies, t.topic_title, t.forum_id, t.topic_last_post_id, t.topic_id ', 'FROM' => array(TOPICS_TABLE => 't', POSTS_TABLE => 'p'), 'LEFT_JOIN' => array( array( 'FROM' => array(USERS_TABLE => 'u'), 'ON' => 't.topic_last_poster_id = u.user_id', ), array( 'FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 'f.forum_id = t.forum_id', ), ), 'WHERE' => 'p.post_id = t.topic_last_post_id AND p.post_approved = 1 AND t.topic_moved_id = 0' . $sql_and, 'GROUP_BY' => 't.topic_id', 'ORDER_BY' => 'post_time DESC', ); $result = $db->sql_query_limit($db->sql_build_query('SELECT', $sql_ary), 10); while( $row = $db->sql_fetchrow($result) ) { $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id']); $view_forum_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']); $topic_title = censor_text($row['topic_title']); if (utf8_strlen($topic_title) >= 40) { $topic_title = (utf8_strlen($topic_title) > 40 + 3) ? utf8_substr($topic_title, 0, 40) . '...' : $topic_title; } $template->assign_block_vars('hot_topic_row',array( 'U_TOPIC' => $view_topic_url, 'U_FORUM' => $view_forum_url, 'FORUM_NAME' => $row['forum_name'], 'TOPIC_VIEWS' => $row['topic_views'], 'TOPIC_REPLIES' => $row['topic_replies'], 'POST_TEXT' => $user->lang['VIEW_LATEST_POST'], 'POST_TIME' => $user->format_date($row['post_time']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'TOPIC_TITLE' => $topic_title) ); } $db->sql_freeresult($result);
Code: Select all
<!-- Start Latest posts --> <!-- IF not S_IS_BOT --> <div class="forabg"> <div class="inner"><span class="corners-top"><span></span></span> <ul class="topiclist"> <li class="header"> <dl class="icon"> <dt>The ten most recent posts</dt> <dd class="posts">Replies</dd> <dd class="views">Views</dd> <dd class="author">Posted by:</dd> </dl> </li> </ul> <!-- ENDIF --> <!-- BEGIN hot_topic_row --> <ul class="topiclist forums"> <li class="row"> <dl> <dt><a class="topictitle" href="{hot_topic_row.U_TOPIC}" <!-- IF hot_topic_row.POST_TEXT -->title="{hot_topic_row.POST_TEXT}"<!-- ENDIF -->><b>{hot_topic_row.TOPIC_TITLE}</a> </dt> <!-- IF not S_IS_BOT --> <dd class="topics">{hot_topic_row.TOPIC_REPLIES}</dd> <dd class="topics">{hot_topic_row.TOPIC_VIEWS}</dd> <dd class="topics">{hot_topic_row.USERNAME_FULL}</dd> <!-- ENDIF --> </dl> </li> </ul> <!-- END hot_topic_row --> <!-- IF not S_IS_BOT --> <span class="corners-bottom"><span></span></span></div> </div> </div><br /> <!-- ENDIF --> <!-- End Latest posts -->
i have thought about this, i love the idea, but its very complicated and would make this mod more complex than intended. Instead you can install a mod on the pages you want that does this. Mods like thissleevedbiker wrote:How would i make it possible for members to add comments to one of the pages in frontpage?
Sounds nice, Wanna share a link ?sleevedbiker wrote:thanks i just used my own code to make a java style comment box.
This is a very simple mod, still in beta. So if you use a changed version of the styles in the mod there may stuff you need to tweak to get it to look good.aaalba wrote:well prosilver is conflicting, cant see all images, mabey because of mods.... revolution theme is horrible with this mod.
Yes, its not only posible, its default in this mod.Inner Circle wrote:Hi there!
Is it possible that you can use the frontpage on
http://www.yourpage.com
and the forum on
http://www.yourpage.com/forum ?
Ah ok! I should read more carefully next timeDoYouSpeakWak wrote: Yes, its not only posible, its default in this mod.
A new version will be done in max a week since this mod is a part of a new site and have to be done by then.
New stuff will be
updated java to latest version (more smooth and fast)
Template and php bugs fixed (its been slimmed down a bit so less to load)
And a few other surprises maybe
It looks good on your page. Remember you can change all the colors of the menu system and the text in the file frontpage.cssInner Circle wrote:Ah ok! I should read more carefully next timeDoYouSpeakWak wrote: Yes, its not only posible, its default in this mod.
A new version will be done in max a week since this mod is a part of a new site and have to be done by then.
New stuff will be
updated java to latest version (more smooth and fast)
Template and php bugs fixed (its been slimmed down a bit so less to load)
And a few other surprises maybe![]()
I´m looking forward to the next update, i´ll going to try out the current version now
ThanksDoYouSpeakWak wrote:
It looks good on your page. Remember you can change all the colors of the menu system and the text in the file frontpage.css
You can do that yourself already with any of the pages you create for Frontpage.Inner Circle wrote:How about adding a feature, where you can post News on the Main Page (or whatever page one want to use )?