vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Latest Threads On Forum Home (https://vborg.vbsupport.ru/showthread.php?t=83230)

The Chief 03-15-2006 05:03 PM

hey Chris, there is a problem with putting this into all pages, like you said before, we had to write:

Code:

require_once('./includes/functions_forumlist.php');
after
Code:

#################### PROCESS LATEST THREADS #######################;
but with 3.5.4, the functions_forumlist.php has changed since the 3.5.2, and now the ONLY problem I am recieving is in the USERCP subscriptions, the subscriptions are replacing the $threadbits...

can you check this out?

thanks!

Tyegurl 03-19-2006 10:35 PM

am i dumb or did i do something wrong....i installed it and changed the text...nothing. i am using 3.5.4 ...maybe it doesn't work with that one? but it looks like someone go it to....


www.teamrespawn.com/vBulletin/index.php

xlguy 03-19-2006 11:37 PM

Quote:

Originally Posted by Sam Granger
How do I remove the "? Replies: 0 ? Views: 2 " part?

Edit the forumhome_latestthreadbit template.

Just installed on 3.5.4 and works fine so far (using PHP 4.x)

The Chief 03-20-2006 02:42 PM

Quote:

Originally Posted by The Chief
hey Chris, there is a problem with putting this into all pages, like you said before, we had to write:

Code:

require_once('./includes/functions_forumlist.php');
after
Code:

#################### PROCESS LATEST THREADS #######################;
but with 3.5.4, the functions_forumlist.php has changed since the 3.5.2, and now the ONLY problem I am recieving is in the USERCP subscriptions, the subscriptions are replacing the $threadbits...

can you check this out?

thanks!

did anybody find a solution to this??

Tyegurl 03-22-2006 05:30 PM

can someone please help me??? i would really like to use this.... i want my forum threads on separate pages but if i do that then no one can see the new posts...so this would be wonderful!!!

soma??? someone???

Tyegurl 03-26-2006 10:16 PM

okay i got mine all sorted out....not really sure what happened but it just showed up one day lmfao!

Stop 03-26-2006 10:44 PM

Looks fine.
Installed.

Tyegurl 03-26-2006 11:14 PM

okay i have one question....right now i have this installed at the top above my vbshoutbox...is there a way to get it under the shoutbox?

i can get it on the bottom fo the forum and in the whats going on area....i would prefer under the shoutbox i think...

and one last thing....how do i show 7 threads?

zurv 03-27-2006 04:20 PM

Hello,

I have a right side menu which I edit through "right_column"

How can I get my latest threads to display here? I have tried and tried but have been unsucessfull.

Btw, the right hand menu shows on all pages.

thanh 03-30-2006 06:34 PM

I had the errrors

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT post.pagetext AS preview,
thread.threadid, thread.title AS threadtitle, lastpost, forumid, pollid, open, replycount, postusername, postuserid, lastposter,
thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible


FROM thread AS thread

LEFT JOIN recentlyviewed AS recentlyviewed ON(recentlyviewed.threadid = thread.threadid)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
WHERE thread.threadid IN(4,5,1,2,3,15,19,8,22,23,28,29,11,34,18,24,25,20 ,40,42,57,59,60,62,31,64,65,35,66,6,7,67,41,73,63, 72,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89 ,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104 ,105,106,107,71,111,115,117,127,157,134,181,156,12 0,186,141,159,197,234,217,216,187,237,196,192,243, 211,244,215,133,212,246,158,268,270,272,274,276,27 7,278,279,280,281,282,283,284,285,286,287,289,290, 291,292,294,295,296,298,299,300,301,302,303,68,304 ,307,308,309,310,312,313,314,315,316,317,318,320,3 21,322,323,324,325,326,327,328,180,330,152,331,333 ,221,335,336,337,188,338,341,342,347,340,359,384,3 79,386,155,385,362,344,390,391,358,396,415,441,458 ,463,436,474,476,429,269,461,484,487,493,488,491,5 02,509,511,512,513,514,515,516,517,519,521,522,523 ,524,504,424,496,492,154,421,537,531,470,420,560,5 58,564,477,466,426,542,430,494,475,561,566,520,568 ,604,596,574,600,618,615,614,623,624,585,619,622,5 98,563,577,261,645,423,706,670,757,756,866,937,802 ,808,841,692,960,904,829,1030,1014,1029,1034,1046, 377,1036,1044,1033,1018,375,1022,1051,206,401,409, 367,378,387,13,453,951,1143,1217,1219,1149,1195,10 42,1272,1275,1305,632,275,241,675,1658,373,1303)
ORDER BY recentlyviewed.dateline DESC
LIMIT 5;

MySQL Error : Got error 28 from table handler
Error Number : 1030
Date : Thursday, March 30th 2006 @ 03:30:52 PM
Script : http://xxxxxxxxxxxxxx/forums/index.php
Referrer : http://xxxxxxxxxx/forums/showthread.php?t=1679
IP Address : xxxxxxxxxxxxxx
Username : admin
Classname : vb_database

thanh 03-30-2006 06:35 PM

could u please help me fix it yet?

jokerz 03-31-2006 02:52 PM

Quote:

Originally Posted by zurv
Hello,

I have a right side menu which I edit through "right_column"

How can I get my latest threads to display here? I have tried and tried but have been unsucessfull.

Btw, the right hand menu shows on all pages.

I don't know what you did wrong. I installed this hack today and no problem with right column.

Thanks for latest thread hack :)

jokerz 03-31-2006 03:02 PM

Quote:

Originally Posted by Tyegurl
can someone please help me??? i would really like to use this.... i want my forum threads on separate pages but if i do that then no one can see the new posts...so this would be wonderful!!!

soma??? someone???

okay i have one question....right now i have this installed at the top above my vbshoutbox...is there a way to get it under the shoutbox?

i can get it on the bottom fo the forum and in the whats going on area....i would prefer under the shoutbox i think...

and one last thing....how do i show 7 threads?

I know the answers from your question, be patience when people can help you.

Ericsson 04-02-2006 07:29 PM

Has anyone got any screenshots or demosof this?

xspazx 04-03-2006 09:23 PM

demo: http://chewonthat.net/ FOOTER

PBX1 04-05-2006 11:42 PM

How do I place this in a different spot on the forum. I'd rather have it at the top of the page, rather than at the bottom.

SHalliday 04-16-2006 02:01 PM

Installed and working perfect! Thank you for the Awesome plugin.

Invalid ID 04-18-2006 04:19 AM

I have installed it, made the required changes, but still no thread is shown on the forum home.

Invalid ID 04-18-2006 05:30 PM

Nobody knows why? :)

Invalid ID 04-19-2006 06:46 AM

Still awaiting help

Invalid ID 04-19-2006 06:41 PM

Ok, I give up hopes.

Bye

jokerz 04-21-2006 09:03 AM

Quote:

Originally Posted by PBX1
How do I place this in a different spot on the forum. I'd rather have it at the top of the page, rather than at the bottom.

Just move variable code where you want to show. Not good thinking ay?

Invalid ID 04-24-2006 06:42 AM

Quote:

Originally Posted by xspazx

R u sure I can see that there?

jason_x 04-27-2006 05:36 PM

does it work in 3.5.4?

wrang 04-27-2006 06:49 PM

Quote:

Originally Posted by jason_x
does it work in 3.5.4?

Yes it work fine on my forum with VB 3.5.4

jason_x 04-27-2006 07:43 PM

installed but i think there is a permission bug:

can view forum set to no but the thread shows up in the latest threads list.

also the internal area (viewable by administrators only) shows up there

Deska 04-28-2006 12:14 AM

Anyone know how to make it enable on all pages?

Vierie 04-28-2006 01:25 PM

Quote:

Originally Posted by jason_x
installed but i think there is a permission bug:

can view forum set to no but the thread shows up in the latest threads list.

also the internal area (viewable by administrators only) shows up there

Did you test it as a guest? As admin you will see all threads.

RichieBoy67 04-29-2006 02:43 PM

I would like to disable certain members posts from showing. Can anyone supply the code for this???

Thanks

Pathor 04-29-2006 06:26 PM

I don“t see anything on my lokal test-system...

php5, mysql5

jason_x 04-30-2006 11:05 AM

Quote:

Originally Posted by Vierie
Did you test it as a guest?

yes.

temporary solution:
i have added the forumid to $limitfids (hook forum_complete).

Code:

fetch_permissions($forum['forumid']);

$limitfids = "1,2";

// ## HIDE FORUMS WITHOUT THE CANVIEW PERMISSION ##

threads with this forumid will not show up on latest threads (unfortunately for all usergroups!).

Pathor 04-30-2006 04:53 PM

Quote:

Originally Posted by Mike-D
Pathor? Your SN sounds known for me. Are you from vB Germany?

Yes, I am. ;)

Welche Version hast Du ? L?uft hervorragend unter 3.54. Ich habe einige ?nderungen am Code gemacht, so das die ?bersicht nun als Tabelle dargestellt wird. Ist nur halt das Problem, das G?ste es auch seheh k?nnen, und das m?chte ich nicht. Hast Du irgendeine Idee, wie man das abschalten kann? Meine PHP Kentnisse sind sehr begrenzt - leider :( -Mike

Du musst eine if-condition um den ganzen Templatecode setzen.

<if condition="$bbuserinfo['userid']">
<Latest Threads on Forum Home>
</if>

Somit sehen nur registrierte Benutzer dein Forum. :)

Pathor 04-30-2006 06:52 PM

Quote:

Danke mein Freund. Ich schulde Dir was. Wenn ich auch mal irgendwas f?r Dich tun kann - z?gere mich nicht, mich zu fragen -Micha
Kein Prob. ;)
Quote:

Somit sehen nur registrierte Benutzer dein Forum.
Soll nat?rlich 'Plugin' am Ende hei?en. :D

Tim Simms 05-13-2006 10:31 AM

I needed to be able to see the names of the forums in the list, so I modified it a bit... Here's the XML code:

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="chrism_latestthreads" active="1">
        <title>Latest Threads on Forum Home</title>
        <description>This product will show the Latest Threads posted (using permissions) on your forumhome</description>
        <version>1.1.2</version>
        <codes>
        </codes>
        <templates>
                <template name="forumhome_latestthreadbit" templatetype="template" date="1129992702" username="Chris M" version="3.5.0"><![CDATA[<div class="smallfont">
        <if condition="$show['firstnew']">
                <a href="showthread.php?t=$thread[threadid]&amp;goto=newpost"><img src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a>
        </if>
        <if condition="$show['icon'] && !$show['firstnew']">
                <img src="$vboptions[bburl]/$thread[threadiconpath]" border="0" alt="$thread[threadicontitle]" title="$thread[threadicontitle]" style="vertical-align: text-middle" />
        </if>
        <a href="showthread.php?t=$thread[threadid]" title="$thread[preview]"><strong>$thread[title]</strong></a>
        <em>$vbphrase[last_post]:</em> $thread[date] <if condition="$vboptions['yestoday'] != 2"><span class="time">$thread[time]</span></if> <phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase>
        &raquo; $vbphrase[replies]: $thread[replycount]
        &raquo; $vbphrase[views]: $thread[views]
</div>]]></template>
        </templates>
        <plugins>
                <plugin active="1">
                        <title>Latest Threads on Forum Home</title>
                        <hookname>cache_templates</hookname>
                        <phpcode><![CDATA[global $globaltemplates;

$globaltemplates = array_merge($globaltemplates, array('forumhome_latestthreadbit'));]]></phpcode>
                </plugin>
                <plugin active="1">
                        <title>Latest Threads on Forum Home</title>
                        <hookname>forumhome_complete</hookname>
                        <phpcode><![CDATA[// #################### PROCESS LATEST THREADS #######################
// fetch the permissions for each forum
global $vbulletin;

$forumperms = array();
foreach($vbulletin->forumcache AS $forum) {

        $forumperms[$forum["forumid"]] = fetch_permissions($forum['forumid']);

        // ## HIDE FORUMS WITHOUT THE CANVIEW PERMISSION ##
        if (!($forumperms[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums']) {
                $limitfids .= ','.$forum['forumid'];
        }
}
unset($forum);

if ($vbulletin->options['threadpreview'] > 0) {
        $previewfield = ', post.pagetext AS preview';
        $previewjoin = 'LEFT JOIN '.TABLE_PREFIX.'post AS post ON(post.postid = thread.firstpostid)';
}

$getthreads = $db->query_read("
        ## GET LATEST THREADS ##
        SELECT thread.*,forum.title AS forumtitle,thread.iconid AS threadiconid $previewfield
        FROM ".TABLE_PREFIX."thread AS thread
        LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
        $previewjoin,
        ".TABLE_PREFIX."forum AS forum WHERE forum.forumid = thread.forumid
        AND open <> 10
        AND thread.forumid NOT IN (0$limitfids)
        AND thread.visible = '1'
        AND deletionlog.primaryid IS NULL
        ORDER BY lastpost
        DESC LIMIT 5");

while($thread = $db->fetch_array($getthreads)) {

        $threads = true;
        $thread['title'] = fetch_censored_text(fetch_trimmed_title(unhtmlspecialchars($thread['title']), 22));
        $thread['date'] = vbdate($vbulletin->options['dateformat'], $thread['lastpost'], 1);
        $thread['time'] = vbdate($vbulletin->options['timeformat'], $thread['lastpost']);
        $thread['preview'] = preg_replace('#\[quote(=(&quot;|"|\'|).*\\2)?\](.*)\[/quote\]#siU', '', $thread['preview']);
        $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode(fetch_censored_text($thread['preview']), false, true), $vbulletin->options['threadpreview']));
        $thread['replycount'] = vb_number_format($thread['replycount']);
        $thread['views'] = vb_number_format($thread['views']);

        // thread icon
        $show['icon'] = false;
  $icon = fetch_iconinfo($thread['iconid']);

  if (is_array($icon)) {
      $show['icon'] = true;
      $thread['threadiconpath'] = $icon['iconpath'];
      $thread['threadicontitle'] = $icon['title'];
  }

        // show goto new post
        $show['firstnew'] = false;
        $bbforumview = fetch_bbarray_cookie('forum_view', $thread['forumid']);

        if ($bbforumview > $vbulletin->userinfo['lastvisit']) {
                $lastread = $bbforumview;
        } else {
                $lastread = $vbulletin->userinfo['lastvisit'];
        }

        if ($thread['lastpost'] > $lastread) {

                $threadview = fetch_bbarray_cookie('thread_lastview', $thread['threadid']);

                if ($thread['lastpost'] > $threadview) {
                        $show['firstnew'] = true;
                        $show['icon'] = false;
                }
        }

        exec_switch_bg();

        eval("\$threadbits .= \"".fetch_template('forumhome_latestthreadbit')."\";");
}
if ($threads) {
        $show['latestthreads'] = true;
}
// memory saving
unset($thread, $threads);
$db->free_result($getthreads);]]></phpcode>
                </plugin>
        </plugins>
        <phrases>
                <phrasetype name="GLOBAL" fieldname="global">
                        <phrase name="latest_threads"><![CDATA[Latest Threads]]></phrase>
                </phrasetype>
        </phrases>
        <options>
        </options>
</product>


Then, in the FORUMHOME, here's the Lastest Threads section:

PHP Code:

<!-- latest threads -->
<if 
condition="$show['latestthreads']">
<
tbody>
    <
tr>
        <
td class="thead" colspan="2">
            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumhome_latestthreads')"><img id="collapseimg_forumhome_latestthreads" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_latestthreads].gif" alt="" border="0" /></a>
            
$vbphrase[latest_threads]
        </
td>
    </
tr>
</
tbody>
<
tbody id="collapseobj_forumhome_latestthreads" style="$vbcollapse[collapseobj_forumhome_latestthreads]">
    <
tr>
        <
td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[latest_threads]/></td>
        <
td class="alt1"><div class="smallfont">$threadbits</div></td>
    </
tr>
</
tbody>
</if>
<!-- /
latest threads --> 

Worked like a charm! :cool:

somasimple 05-16-2006 10:28 AM

Hi Tim,

The forumtitle you used isn't used in any another place.
The modidfication doesn't show the forum title! :confused:

criscokid 05-17-2006 05:42 PM

Can this mod be used to show the 'latest threads' block other than on forumhome? like on a portal front page?

jokerz 05-18-2006 08:53 AM

This hack is not about the latest threads, it is only when you post the threads and it'll show the latest post in threads. Weird.. I thought its only list of new threads not new posts.

eg. If I post in old thread or new thread, both will show up as 'Latest Threads'

harishankar 05-18-2006 09:08 AM

That's exactly what I'm looking for jokerz. I wanted latest posts. I guess this is the mod.

For the "Latest threads" as you want it, I think there's a tutorial at vbulletin.com which does that using the external hook.

criscokid 05-18-2006 10:57 AM

I found the HowTo Display Latest Active Threads on ANY normal HTML page document. but it's only the 'last x threads posted' not 'last x postings posted' like this one is.

This is the one that I want - I just loosely used the term 'latest threads' as I took it from the title of this mod. Maybe it should be renamed to be more exact?

Anyway... is it possible to use this mod on a page other than on forumhome ( like on a portal front page)?

harishankar 05-18-2006 12:57 PM

Any way to control to number of new topics which appear?


All times are GMT. The time now is 08:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01510 seconds
  • Memory Usage 1,869KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete