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)

criscokid 08-29-2006 04:59 PM

How can I get the usernames sisplayed in the 'Latest forum threads' section when clicked on to open in a new window?

shaynehammy 08-31-2006 04:01 AM

If i want to change the display name to "The latest 20 threads" or similar would i change the phrase after CDATA below?

<phrase name="latest_threads"><![CDATA[Latest Threads]]></phrase>
</phrasetype>
</phrases>
<options>
</options>
</product>

Nick0r 08-31-2006 07:50 AM

Unfortately Onkel_Tom, that made no difference. On 3.6 guests can still see private threads showing up in the 'Latest threads' section of the homepage.

aveon 09-03-2006 02:08 AM

does anybody know how to make this hack visible on all pages???

Pathor 09-03-2006 03:11 PM

<a href="http://www.vbulletin.com/forum/showthread.php?t=198968" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=198968</a>

That´s also possible with this hack.

aeroguy 09-04-2006 04:48 AM

could some add a join table function as to also enable to show what forum the threads are in. The get thread function within the mod already sees the forum id just need a join to get the name from the id.

Onkel_Tom 09-04-2006 09:50 AM

Quote:

Originally Posted by aeroguy
could some add a join table function as to also enable to show what forum the threads are in. The get thread function within the mod already sees the forum id just need a join to get the name from the id.

Should be done with:
PHP Code:

## GET LATEST THREADS ##
$getthreads $db->query_read("
    SELECT forum.title AS forumtitle, 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')
            LEFT JOIN " 
TABLE_PREFIX "forum AS forum ON (forum.forumid = thread.forumid)
            
$previewjoin
            WHERE thread.open = '1'
            AND thread.forumid NOT IN (0
$limitfids)
            AND thread.visible = '1'
            AND deletionlog.primaryid IS NULL
            ORDER BY lastpost
            DESC LIMIT 10"
); 

and to restrict the lenght add after:
PHP Code:

$thread['title'] = fetch_censored_text(fetch_trimmed_title(unhtmlspecialchars($thread['title']), 55)); 

PHP Code:

$thread['forumtitle'] = fetch_censored_text(fetch_trimmed_title(unhtmlspecialchars($thread['forumtitle']), 50)); 

To show the name of the forum you have to change the Template forumhome_latestthreadbit, add
PHP Code:

<a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]title="go to $thread[forumtitle]">$thread[forumtitle

or something like that.

aveon 09-04-2006 01:22 PM

hey Tom it didnt work mate or did i do something wrong i added the codes where you wanted me to add them and the latest posts still only visible on forum home how can i set permissions and make it visivle on all pages helpme please and i will come up with a really good design for side column...

putergirl 09-04-2006 02:41 PM

Hello, I am having problems viewing the latest threads. Sometimes I can see it and sometimes I can't. I've tried clearing my cache and the cookies to no avail. Just when I give up, it will show again briefly, then poof, gone again. I mean, I had resined myself to not being able to see it, and it showed up an hour later after I did nothing. Any ideas what could be causing that? The same thing happens with my users, some can see it, some can't, and we didn't have this problem till I upgraded to 3.6. Thanks.

I have also tried re-importing the product and allowed overwrite.

aeroguy 09-04-2006 04:07 PM

i am too getting an mysql error

Invalid SQL:

## GET LATEST THREADS ##
SELECT thread.*,thread.iconid AS threadiconid , post.pagetext AS preview
FROM CT_thread AS thread
LEFT JOIN CT_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
LEFT JOIN CT_forum AS forum ON(forum.forumid = thread.forumid)
LEFT JOIN CT_post AS post ON(post.postid = thread.firstpostid)
WHERE open <> 10
AND forumid NOT IN (0)
AND thread.visible = '1'
AND deletionlog.primaryid IS NULL
ORDER BY lastpost

dodjer42 09-08-2006 08:17 AM

Awesome mod, and thanks Tom for the info on how to change the title length.

MRGTB 09-08-2006 02:09 PM

I've just noticed somthing regarding W3C and CCS validation. While it validates OK in W3C. It doesn't in CSS.

The problem seems to be the use of this in the latestthreadbit template.

Code:

style="vertical-align: text-middle"
It's failing the validation, anybody got any idea what to use instead that will pass CSS

MRGTB 09-08-2006 02:20 PM

Here is the fix, change this:

Change this code to in the "forumhome_latestthreadbit" template.

Code:

<img src="$vboptions[bburl]/$thread[threadiconpath]" border="0" alt="$thread[threadicontitle]" title="$thread[threadicontitle]" style="vertical-align: text-middle" />
To this:

Code:

<img style="vertical-align: middle;" src="$vboptions[bburl]/$thread[threadiconpath]" border="0" alt="$thread[threadicontitle]" title="$thread[threadicontitle]" />
It will then be both W3C and CSS valid

------------------------------

You can also add this code in the same template &nbsp; to create a gap between the Thread Title and the Last Post details.

Look For:

Code:

<a href="showthread.php?t=$thread[threadid]" title="$thread[preview]"><strong>$thread[title]</strong></a>
Change to this:

Code:

<a href="showthread.php?t=$thread[threadid]" title="$thread[preview]"><strong>$thread[title]</strong></a>&nbsp;

Ninth Dimension 09-10-2006 03:05 AM

Hi there, I'm looking for a hack just like this, for vB3.6.0 - but rather than have the thread appear at the bottom of the forumhome page, I'd like them listed in a coloum down the right-hand side of the page... Would this hack be easy to change for that purpose?

Thank you

MRGTB 09-10-2006 03:10 AM

Quote:

Originally Posted by Ninth Dimension
Hi there, I'm looking for a hack just like this, for vB3.6.0 - but rather than have the thread appear at the bottom of the forumhome page, I'd like them listed in a coloum down the right-hand side of the page... Would this hack be easy to change for that purpose?

Thank you

This does work with vBulletin 6, I'm using it on my site. The problem with using it as a side column is the column width will not be wide enough to display all the details. So your better off sticking to a center block.

Ninth Dimension 09-10-2006 03:46 AM

Quote:

Originally Posted by Gary Bolton
This does work with vBulletin 6, I'm using it on my site.

That is good to hear :)
Quote:

The problem with using it as a side column is the column width will not be wide enough to display all the details. So your better off sticking to a center block.
But surely that's just a simple case of editing the html? Maybe start with the thread title, new line, date posted, new line, who posted, etc..

Maybe I'll have a play around with it tomorrow, see if I can get it working the way I want. :)

MRGTB 09-10-2006 11:05 AM

Yes, I guess you could just intruduce some <br /> into the lines.

Ninth Dimension 09-10-2006 10:27 PM

I've successfully been able to edit the templates to achieve what I want, you can see the result here: http://theice.co.uk/ :D

MRGTB 09-10-2006 10:39 PM

I see, well done. I'm thinking you have removed some of the fields. But I'm wondering why you just didn't add some "<br />" in the right places to make the information drop below each other on its own line, so you could have kept a lot more fields displayed in the narrow column. Or did you only want displayed what you have: IE- thread title, time, name.

Ninth Dimension 09-10-2006 10:47 PM

I decided that info such as number of views and posts were not that important. What was more important were details such as the thread title, when it was last updated, and who was the last to post to it, this would allow me to list more threads in the same ammount of space. I guess I could go back and add a 'title' tag to the title of the thread showing the number of posts and views.. *goes off to do that now*

MRGTB 09-10-2006 10:53 PM

Yeah, I know what you mean. Each to there own really. I prefer to show as much info as possible like the FORUM link and so on. But thats me, were all different.

Ninth Dimension 09-10-2006 10:55 PM

A suggestion to the hack owner - to make it so that only threads which have updates the member hasn't yet seen to appear in bold, while the rest remain unbolded.

EDIT: Nevermind, I've just seen you have something like this in place already. :)

Ninth Dimension 09-10-2006 10:56 PM

Quote:

Originally Posted by Gary Bolton
Yeah, I know what you mean. Each to there own really. I prefer to show as much info as possible like the FORUM link and so on. But thats me, were all different.

Yeah, I get what you're saying. One thing I think your forum might benefit from is to use a table to make all the info nice and organised into coloums, rather than just lose like it is now...

MRGTB 09-10-2006 11:02 PM

Quote:

Originally Posted by Ninth Dimension
Yeah, I get what you're saying. One thing I think your forum might benefit from is to use a table to make all the info nice and organised into coloums, rather than just lose like it is now...


Well it's really funny you should say that, because that has crossed my mind, but I was a little unsure how to get each post in it's own column though.

MRGTB 09-11-2006 12:13 AM

How can you get it so each latest thread displayed uses it's own alternate colour. Like alt1 and alt2 in the box. So it looks nicer. So if you displayed 4 threads, they would be like this: alt1,alt2,alt1,alt2

Ninth Dimension 09-11-2006 01:18 AM

I think I can do what you want, both with the coloums and alternating colours, but I'm going to need to see some of your templates first.

I'm going to need part of your FORUMHOME template, everything from <!-- latest threads start --> to <!-- latest threads end -->, and the whole of your forumhome_latestthreadbit template.

It would also be handy if you could give me the content of your 'Latest Threads on Forum Home' plugin.

If you can paste that info here, I'll see what I can do for you :D

MRGTB 09-11-2006 01:24 AM

Here is my template:

Code:

<!-- latest threads start -->
<if condition="$show['latestthreads']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr>
<td class="tcat"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('latest_threads')">
        <img id="collapseimg_latest_threads" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_latest_threads].gif" alt="" border="0" /></a>
<!-- title start -->
Latest Threads
<br />
<div class="smallfont">
Read latest threads
</div>
<!-- title end -->
</td>
</tr>
</tbody>
<tbody id="collapseobj_latest_threads" style="$vbcollapse[collapseobj_latest_threads]">
<tr>
<td class="alt1">
<!-- code start -->
$threadbits
<!-- code end -->
</td>
</tr>
</tbody>
</table>
<br />
</if>
<!-- latest threads end -->

Plug-ins attached

Ninth Dimension 09-11-2006 01:35 AM

I still need the forumhome_latestthreadbit template.

As for the plugin, could you maybe copy/paste the text for me please? The text I need can be found: ACP -> Plugins & Products -> Plugin Manager -> Latest Threads on Forum Home (the one listed next to forumhome_complete) -> then copy/paste all the text from the 'Plugin PHP Code' box please?

I'm just off to bed now, but I'll take a look in the morning and see what I can do for you :D

MRGTB 09-11-2006 01:38 AM

Here the threadbit code:

Code:

<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 style="vertical-align: middle;" src="$vboptions[bburl]/$thread[threadiconpath]" border="0" alt="$thread[threadicontitle]" title="$thread[threadicontitle]" />
        </if>
        <a href="showthread.php?t=$thread[threadid]" title="$thread[preview]"><strong>$thread[title]</strong></a>&nbsp;
        <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]
        &raquo; $vbphrase[forum]: <a href="forumdisplay.php?f=$thread[forumid]">$forumdata[title]</a></div>

But you could have got the template code for this out the plug-in I attached to the other post above as a zip file

Ninth Dimension 09-11-2006 06:08 PM

OK, here goes... I've not tested it or anything, and I've not added the alternating colours yet, but try this on for size and see what you think:

FORUMHOME (part)
Code:

<!-- latest threads start -->
<if condition="$show['latestthreads']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr>
<td class="tcat" colspan="5"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('latest_threads')">
        <img id="collapseimg_latest_threads" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_latest_threads].gif" alt="" border="0" /></a>
<!-- title start -->
Latest Threads
<br />
<div class="smallfont">
Read latest threads
</div>
<!-- title end -->
</td>
</tr>
</tbody>
<tbody id="collapseobj_latest_threads" style="$vbcollapse[collapseobj_latest_threads]">
<!-- code start -->
$threadbits
<!-- code end -->
</tbody>
</table>
<br />
</if>
<!-- latest threads end -->

forumhome_latestthreadbit
Code:

<tr>
<td class="alt1"><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 style="vertical-align: middle;" src="$vboptions[bburl]/$thread[threadiconpath]" border="0" alt="$thread[threadicontitle]" title="$thread[threadicontitle]" />
</if>
<a href="showthread.php?t=$thread[threadid]" title="$thread[preview]"><strong>$thread[title]</strong></a></div></td>

<td class="alt2"><div class="smallfont"><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></div></td>

<td class="alt1"><div class="smallfont">$vbphrase[replies]: $thread[replycount]</div></td>

<td class="alt2"><div class="smallfont">$vbphrase[views]: $thread[views]</div></td>

<td class="alt1"><div class="smallfont">$vbphrase[forum]: <a href="forumdisplay.php?f=$thread[forumid]">$forumdata[title]</a></div></td>
</tr>


MRGTB 09-11-2006 07:04 PM

what files did you edit, it looks like the only changes you've made are to the latestthreadbit. Is that right?

Because I can just replace that template with your code to test it if that's all you've changed, rather than uploading the changed code as a plug-in

MRGTB 09-11-2006 07:40 PM

No it did what I thought it would do after looking at your code changes, it put each item in it's own seperate column sideways and looked a right mess. You went along the same lines as me in your thinking. But it doesn't work that way I'm afraid. You just finish up with either more columns than you want, or the threads repeat each other if you try the same method using the $threadbit and more alts in the forumhome box code.

Ninth Dimension 09-11-2006 07:46 PM

Well, it's a bit hard to work on building what you want remotly like this... I gave it a shot, but i guess I failed... oh well, sorry.... I'm sure you'll be able to work out what you need to do.. good luck.

MRGTB 09-11-2006 07:57 PM

Not to worry, it no big deal. I'll play around in the future with it. As I'm busy working on another ed2k hack I have installed right now.

aveon 09-11-2006 09:13 PM

is there any way to show it on header instead of only on forum home i asked that question couple of time now any body can help me??

MRGTB 09-11-2006 09:25 PM

Quote:

Originally Posted by aveon
is there any way to show it on header instead of only on forum home??

you could just put the box in the header, instead of the FORUMHOME template, but I'm not sure if that would work, as I think without trying it, it needs to be in the FORUMHOME template to grab the information. But you can try it.

It's only a case of putting the box that displays the threads in the header instead of the FORUMHOME.

aveon 09-11-2006 10:34 PM

Quote:

Originally Posted by Gary Bolton
you could just put the box in the header, instead of the FORUMHOME template, but I'm not sure if that would work, as I think without trying it, it needs to be in the FORUMHOME template to grab the information. But you can try it.

It's only a case of putting the box that displays the threads in the header instead of the FORUMHOME.

it doesntwork that way it needs a modification but i need help on this

MRGTB 09-12-2006 01:09 AM

the answer to your question is in this thread, When I ran vBulletin 3 and installed her hack (which this is based off) I had it working on an external page, as well as my forumhome. You have to add some code I think to either global.php or another file. The answer is somewhere on the first 15-20 pages of this thread.

https://vborg.vbsupport.ru/showthrea...latest+threads

aveon 09-12-2006 02:08 AM

hello gary i tried that but when i tried to edit the index php it gives me error when i upload back to db so is there anyother way to do this ill be really apparitiated

MRGTB 09-12-2006 02:21 AM

Well there are two things in that thread you has to get right. one was this.

@SuperG: Put the code just above the following in global.php so its run on everypage and you could be able to add the $threadbits variable in any of the templates:

Code:

// parse some global templates
If vB use that variable on any page then you'll need to change this line:

Code:

require_once('./includes/functions_forumlist.php');
eval("\$threadbits .= \"".fetch_template('forumhome_latestthreadbit')."\";");

And replace $threadbits with something unique like $my_latest_threads for example and change the variable in the template accordingly.

try that, becuase you might have missed the bit were the guy got an error like you and had to add another line to the code I've highlighted in red.


All times are GMT. The time now is 03:42 AM.

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.01737 seconds
  • Memory Usage 1,867KB
  • 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
  • (11)bbcode_code_printable
  • (4)bbcode_php_printable
  • (8)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