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)

Xplorer4x4 02-12-2007 07:26 PM

Quote:

Originally Posted by Irisfire (Post 1180902)
already tried inserting that...i know how to get it to show (I'm a Designer)...issue is...it will show the titles (Posts, Views, etc) if I put them in...but the second it calls that variable it won't output anything else...and that's where i'm stuck...(I'm NOT a coder...lol)

You lost me, can you link to a demo or a screen shot?

Staxed 02-12-2007 07:28 PM

in about 30 mins I can...

(at work right now and can't get to it from behind work firewall)...i undid my modifications since they didn't work.

where are you lost?...it just doesn't show the info that it's supposed to show...(come to think of it...I think I have the call to the custom template in the navbar...i'll check when i get home...where would i change the hook for that?)

Xplorer4x4 02-12-2007 07:40 PM

Oh in that case maybe try navbits as the hook.

croportal 02-12-2007 09:16 PM

is this work with 3.6 version, and if not, do you know hack like this with 3.6. version

Xplorer4x4 02-12-2007 09:23 PM

Quote:

Originally Posted by croportal (Post 1181008)
is this work with 3.6 version, and if not, do you know hack like this with 3.6. version

Works fine for me on 3.6.4.

croportal 02-12-2007 09:25 PM

thanks ; xplorer ;)

croportal 02-12-2007 09:28 PM

how can add more threads, its only 5 Croportal

Xplorer4x4 02-12-2007 09:32 PM

Go back a page or so and I explained it in one of my posts.

croportal 02-12-2007 09:36 PM

thanks ;) really thanks ;)


just one question

how can i remove smilyes and icons, and the thread go to new posts, last page, not first

Xplorer4x4 02-12-2007 09:46 PM

Smileys will not be parsed. Icons can be removed in the "forumhome_latestthreadbit" template. Simply search for .gif and when you find it you will see it in a code like
PHP Code:

<img src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]border="0" /> 

Just remove everything starting at <img all the way to the /> including />

Quote:

and the thread go to new posts, last page, not first
Not sure I follow but you want it to go to the last page of any thread listed in the latest threads table? The only way I could think of doing this is simply to have the template edited so when you click a thread name it would go to the last post of the thread instead of the first unread post. Would you be interested in that?

croportal 02-12-2007 09:49 PM

Quote:

Originally Posted by Xplorer4x4 (Post 1181031)
Smileys will not be parsed. Icons can be removed in the "forumhome_latestthreadbit" template.


what mean parsed? sorry but my english is bad :D

how i remove icons in template? i dont understand

Quote:

Originally Posted by Xplorer4x4 (Post 1181031)
Not sure I follow but you want it to go to the last page of any thread listed in the latest threads table? The only way I could think of doing this is simply to have the template edited so when you click a thread name it would go to the last post of the thread instead of the first unread post. Would you be interested in that?


i want when i click on thread to go to the last post, not first


yes this is nice idea

but i am newbie in this stuff, so can u explain a little bit better

thanks and sorry for my bad english

croportal 02-12-2007 10:20 PM

Quote:

Originally Posted by Xplorer4x4 (Post 1181031)
Smileys will not be parsed. Icons can be removed in the "forumhome_latestthreadbit" template. Simply search for .gif and when you find it you will see it in a code like
PHP Code:

<img src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]border="0" /> 

Just remove everything starting at <img all the way to the /> including />


Not sure I follow but you want it to go to the last page of any thread listed in the latest threads table? The only way I could think of doing this is simply to have the template edited so when you click a thread name it would go to the last post of the thread instead of the first unread post. Would you be interested in that?


i have done that, and look now? what with POST ICONS

thanks ;) Croportal

Xplorer4x4 02-12-2007 10:56 PM

Quote:

Originally Posted by croportal (Post 1181033)
what mean parsed? sorry but my english is bad :D

how i remove icons in template? i dont understand




i want when i click on thread to go to the last post, not first


yes this is nice idea

but i am newbie in this stuff, so can u explain a little bit better

thanks and sorry for my bad english

I mean smilies will not show up as smilies, they will only show up as :) instead of :)

I uploaded an updated XML file. Just upload it and make sure you choose YES to overwrite. It will redirect to the last post and will also not have any images except one.

croportal 02-12-2007 11:00 PM

yes i did, and as you seen its the same like before?

when you click thread it opens first post not last

Xplorer4x4 02-12-2007 11:28 PM

If you over write the old hack there I don't see how. I have personally tested it on my forum.

Regardless, replace your forumhome_latestthreadbit template with the following:
PHP Code:

<div class="smallfont">
    <
a href="showthread.php?t=$thread[threadid]&amp;goto=newpost" 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


KrisP 02-18-2007 02:50 PM

I have installed it (added code to the forum home template and imported the product) but nothing shows up on my forum home page. Have I missed something ?

Moon! 02-18-2007 07:20 PM

Hello thanks for this it was just what I was looking for, I have installed it on 3.6.4 fine, I put this at the top of my forums just under the nav bar and just had to modify the template for it up there.

Eagle Creek 02-19-2007 07:11 AM

Is it possible to excluse one forum?

Vierie 02-22-2007 07:38 AM

I get the error message Cannot use a scalar value as an array in /search.php on line 2179 if I use the new posts button in my forum. By deactivating plugins I found out that it seems to be caused by this product.

Any idea what could cause that and how to resolve it? I don't want to remove the product. :(

Vierie 02-22-2007 07:43 AM

Quote:

Originally Posted by Irisfire (Post 1177189)
ok, i'm not a coder my any means...i'm just a little 'ole designer...and for the life of me I can't get the threads to show in someplace other than the forumhome.

I'm trying to use this mod, but instead of having all the forumhome stuff...i just want to have the lastest thread titles put into a side column...i've looked at the added templates...copied what's there...and all it will do is post the sections titles..."last post by reviews views"...but doesn't put the actual info in there...

can someone possibly shed some light on how to get just the titles to show in another template other than forumhome?

Try putting in
PHP Code:

require_once('./includes/functions_forumlist.php'); 

at the start of the php code in the code xml-file and change the hook to global_start.

Works for me. :)

Vierie 02-22-2007 07:48 AM

@Eagle Creek

Look for

PHP Code:

// fetch the permissions for each forum  
global $vbulletin;

$forumperms = array(); 

in the xml-file.

Below that add

PHP Code:

$limitfids 

x is the ids of the forum you want to exclude.

maxicep 02-26-2007 10:17 AM

found my problem :)

wrang 03-03-2007 05:12 PM

I should do a update with this plugin but now i cant find where i should write with forum who dosent should show in this plugin.
Can some one help me again.

In the forumhome_complete
PHP Code:

// #################### 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.*,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
    WHERE open <> 10
    AND forumid NOT IN (0
$limitfids)
    AND thread.visible = '1'
    AND deletionlog.primaryid IS NULL
    ORDER BY lastpost
    DESC LIMIT 10"
);

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

    
$threads true;
    
$thread['title'] = fetch_censored_text(fetch_trimmed_title(unhtmlspecialchars($thread['title']), 45));
    
$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']), falsetrue), $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); 

Where do i put the forum ID number??
Is it like this
$limitfids = 55,135,140,142


i run Vbulletin 3.5.4

KrisP 03-06-2007 03:30 PM

I would like to ad forum title.

Anybody who can tell me how to join forum.title to the following:

SELECT thread.*,thread.iconid AS threadiconid $previewfield, thread.lastposter AS lastposter
FROM ".TABLE_PREFIX."thread AS thread
LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
$previewjoin
WHERE open <> 10
AND forumid NOT IN (0$limitfids)
AND forumid NOT IN (69,22,75)
AND thread.visible = '1'
AND deletionlog.primaryid IS NULL
ORDER BY lastpost
DESC LIMIT 15");

Jacqueline 03-13-2007 05:03 PM

Installed in my 3.6.4 forum and it seems to be working great. I made some changes to put it in the header and removed some table information.

Krali 03-14-2007 10:02 AM

Hello,

great hack, I have a question: is it able to have a special topic id every time on the top of the list, like an announcement?

Kind regards

DieselMinded 03-22-2007 10:33 PM

I have this working real nice took me awahile trying to figgure out how not to display certian forum the first few posts about that didnt fit it but the one on page 17 fixed it ,

How can i seperate the information down there so it isnt just one big line of data

www.dieselbombers.com

Thanks Guys

DM

gamelandz 03-27-2007 03:13 AM

How can I make this an entire page of the last 50 posts???

DieselMinded 03-28-2007 05:50 AM

How do I place this info in tables with headers that state Member Thread Forum Ect...

Thanks

DM

vdi 03-28-2007 03:55 PM

Hello
Good hack.

Now, when i click on the last post in your hack, i will see the top of the thread (1. post).

But it is possible to see the last post (last answer) when i click on it ?

Xoligy 04-02-2007 05:35 PM

For those getting errors on search.php, change $lastread with something like $last_read, otherwise you'll get error messages.

This should solve:
Quote:

Cannot use a scalar value as an array in /search.php on line 2179

Vierie 04-03-2007 01:26 PM

Quote:

Originally Posted by Xoligy (Post 1218498)
For those getting errors on search.php, change $lastread with something like $last_read, otherwise you'll get error messages.

This should solve:

Thank you very much. That error was driving me crazy.

DieselMinded 04-04-2007 02:45 PM

How do I place this info in tables with headers that state Member Thread Forum Ect...

Thanks

DM

amagab 04-08-2007 04:08 AM

I am happy to have found this add-on. I am currently using it on my new site http://openfortea.com

However, I'm only able to get it to show on the home page. Why doesn't it show on any of the other pages?

Thanks!

amagab 04-08-2007 04:44 AM

Quote:

Originally Posted by amagab (Post 1222445)
I am happy to have found this add-on. I am currently using it on my new site http://openfortea.com

However, I'm only able to get it to show on the home page. Why doesn't it show on any of the other pages?

Thanks!

Disregard my question. After reading this thread more carefully I found my answer/solution.

Thanks and sorry for my lazyness.

amagab 04-08-2007 05:33 AM

I know several people before me has asked this question but I couldn't find any answer:

I'd like a link for the user to be taken to the last post in the thread. Actually, I'd like to link the words Last Post: to the last post in the thread.

How can I do that?

Thanks!

kaptanblack 04-08-2007 07:43 AM

Thanks...

Nathan2006 04-11-2007 03:24 AM

Quote:

Originally Posted by somasimple (Post 847669)
Hi all,
Solved. Added some lines for the table and moved the code after $navbar.

Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<!-- 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 -->
</table>
<br />



Hi,

I tried your code but I keep getting this (Screenshot)

is there anyway to fix the style to fill the whole box?

Thank you for any help :)

gamelandz 04-12-2007 10:18 PM

I am getting this error when i try and post a thread:

Warning: strpos() [function.strpos]: Empty delimiter. in /global.php(349) : eval()'d code on line 178

Vbulletin message:

Unable to add cookies, header already sent.
File: /home/teambow/public_html/forum/includes/class_core.php
Line: 2984

What do i do???
PLease help

DieselMinded 04-13-2007 09:04 PM

I dont think this is right ... $limitfids = x

But I cant get = 'x,x,x,x,' to work either

The only place this edit will work is under the permissions based section of the xml it wont work for me in global ,,, i have $limitfids = 6 and it works but cannot add more than one with out an error

DM


All times are GMT. The time now is 03:49 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.01826 seconds
  • Memory Usage 1,893KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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