vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - LBmtb's Recent Topics on Non-VB Pages (https://vborg.vbsupport.ru/showthread.php?t=134320)

LBmtb 02-06-2007 04:35 AM

First of all, thanks to everyone for their interest in this mod.
Quote:

Originally Posted by tonynlek (Post 1171280)
LBmtb,

I need help to install it and i dunno much about PHP. care to guide me along or anyone.

I do not know how to do this part:
<< The page it's on must have a .php extension or you should setup apache to parse the page correctly. >>

What must i do first?

You can either rename the page with a .php extension or if your page has a .html or .htm extension add the following to your apache configuration file and restart apache:
Code:

AddType application/x-httpd-php .html .htm

Quote:

Originally Posted by saman (Post 1173661)
facing the same problem

right now i have added it on .html extension and the only thing it shows is this:

recent topics by SocalTrailRiders.org

can someone help me out with this? i really like this mod, i am testing it and if he works i will need to get the copyright removed ($5)...

btw, where should i add this html code?

HTML Code:
<ul class="vb_topics">
<li><a href="http://www.yourdomain.com/forum/showthread.php?t=4150">This is the latest thread</a> <span class="vb_last_post">(user1 @ 12/18/06 05:58 PM)</span></li>
<li><a href="http://www.yourdomain.com/forum/showthread.php?t=4138">Another recent thread</a> <span class="vb_last_post">(user2 @ 12/18/06 05:58 PM)</span></li>
</ul>

Same answer as previous person. Don't insert that html code into your page; it's just an example of the output that the script makes.

Quote:

Originally Posted by tonynlek (Post 1174918)
As far as i know, You need to create an inframe in HTml page to put in the site address of that PHP file and it will open in the inframe.

I hate the borderline of the inframe, so my homepage has to be index.php, in order to put the code without the inframe border.

a programmer that i paid, told me this. I wonder why the script creator dun reply.

That would work, or the apache method I described above, or adding the .php extension like you did.

Quote:

Originally Posted by tonynlek (Post 1174958)
How do you put the ID there?

Just list off the forum ID's and separate them with a comma. For example if I want to only include threads from three forums with ID's 9, 11, and 15 I would have this:
PHP Code:

// use one or the other, not both. if left blank the script will return threads from any forum
$fid_raw "9,11,15"// ONLY include threads from these forums. seperate each ID with a comma
$fidx_raw ""// Exclude threads from these forum. seperate each ID with a comma 

Quote:

Originally Posted by Dave-ahfb (Post 1175281)
I am attempting to install this and it does works as designed, however I am trying to include multiple instances of the script on the same page, each instance using a different forum./

example:

top of page use only forum 14
middle of page use only forum 13

yadda yadda

I can include multiple instances of the same forum meaning I can place forum 14 in as many places of a page as I want, but I cannot get a second forum to show in a different location of the page.

It's possible but you would need to do some renaming of copying and renaming of variables so that variables from one of the sections don't conflict with variables from the other section.

If you need custom work done, PM me.

tonynlek 02-06-2007 11:41 PM

Quote:

You can either rename the page with a .php extension or if your page has a .html or .htm extension add the following to your apache configuration file and restart apache:
Hi LBmtb,

Thanks for your reply. BY the way, where is the apache config file. ANd which part of the page should i put the code in. I am sorry to ask you this question as programming is out of my league. Learning now.

LBmtb 02-07-2007 06:42 PM

Quote:

Originally Posted by tonynlek (Post 1176450)
Hi LBmtb,

Thanks for your reply. BY the way, where is the apache config file. ANd which part of the page should i put the code in. I am sorry to ask you this question as programming is out of my league. Learning now.

I found a good tutorial on it: http://www.adlogger.org/index.php/Pa...Pages_Like_PHP

Tomzl 02-13-2007 04:25 PM

Is there a way to trim the number of characters in the topic title? For example: a topic has 50 characters in its title. Can I show just 25 characters with this script?

roni1015 02-15-2007 01:27 PM

I'm trying to rescrict this to only public forums and it's still showing threads from all forums.

Here is the code I have:

Code:

// use one or the other, not both. if left blank the script will return threads from any forum
$fid_raw = "99,3,119,134"; // ONLY include threads from these forums. seperate each ID with a comma
$fidx_raw = ""; // Exclude threads from these forum. seperate each ID with a comma

I also tried doing it by excluding certain forums instead and removed the ones to include and then added the ones to exclude below, but it didn't work either. What am I doing wrong?

pcoskat 02-15-2007 04:47 PM

LBmtb, is your 'upcoming events' list using the EVENTS mod, or is your mod using a feed directly from the calendar?

roni1015 02-17-2007 04:16 PM

Quote:

Originally Posted by roni1015 (Post 1183202)
I'm trying to rescrict this to only public forums and it's still showing threads from all forums.

Here is the code I have:

Code:

// use one or the other, not both. if left blank the script will return threads from any forum
$fid_raw = "99,3,119,134"; // ONLY include threads from these forums. seperate each ID with a comma
$fidx_raw = ""; // Exclude threads from these forum. seperate each ID with a comma

I also tried doing it by excluding certain forums instead and removed the ones to include and then added the ones to exclude below, but it didn't work either. What am I doing wrong?

Anyone?

superluks 02-19-2007 05:59 PM

i wanna add it to header - i added this code
PHP Code:

<?php include("last.php"); ?>

but it wont content..

Dave-ahfb 03-03-2007 01:20 AM

Is there a way to limit the text string? I have small "modules" and some times they wrap 3 times.

ricker 03-16-2007 04:52 AM

This may be a long shot, but I'm using extra threadfields and am wondering if it'd be easy to include a field or two in the display. :D Thanks for the great mod!!!

Rich 03-23-2007 11:54 PM

I have a request that would benefit me greatly. I am using this modification, or will be anyways, ON vBulletin powered pages. I would LOVE to have this as a variable. My attempts so far have failed at making it function as one though. The best I could do was get it to display a single entry.

I realize there are other modifications out there that do this within the boundries of vB. They don't serve my purpose though.

This one allows me to quickly reuse the same information, except output different forums in a different file. This is what I need.

Any chance you could make this a variable or show me how to make it a variable that I could toss into custom templates I have created? (I already include the global file in THIS modification and output the template below this code. I would like the ability to insert this code though into the templates.

Thanks for any input you could give.

ricker 03-24-2007 11:52 PM

Great script! Thanks! I'm looking to send you over a donation, but Paypal is acting up. Any chance you can add a "donation" link in your post? You may get more clicks.

Keep rockin!
Sarah

LBmtb 03-27-2007 06:26 PM

Quote:

Originally Posted by Dave-ahfb (Post 1194544)
Is there a way to limit the text string? I have small "modules" and some times they wrap 3 times.

Yeah there is, I don't have much time available though. If you really need that done PM me and maybe I can do a custom script for you.
Quote:

Originally Posted by roni1015 (Post 1184662)
Anyone?

Hi Roni. I'm interested in what query the script if using for you. Do this:

After
Code:

$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM ".$db_prefix."thread WHERE visible=1 AND open=1 $fid_final $fidx_final ORDER BY lastpost desc LIMIT $limit");
Insert
Code:

echo "<!-- query: SELECT threadid,title,lastpost,lastposter FROM ".$db_prefix."thread WHERE visible=1 AND open=1 $fid_final $fidx_final ORDER BY lastpost desc LIMIT $limit -->";
Then go to the page, look at the source code and copy the query. You can PM me the query it makes so I can look it over. If you have SSH or phpMyAdmin access you can try the query directly and see what you get.
Quote:

Originally Posted by ricker (Post 1204626)
This may be a long shot, but I'm using extra threadfields and am wondering if it'd be easy to include a field or two in the display. :D Thanks for the great mod!!!

I'm pretty sure it's possible. I haven't looked at the mod myself but I assume it just makes extra fields in the vb_thread table. Again, if you need a customized script for that PM me.
Quote:

Originally Posted by Rich (Post 1210711)
I have a request that would benefit me greatly. I am using this modification, or will be anyways, ON vBulletin powered pages. I would LOVE to have this as a variable. My attempts so far have failed at making it function as one though. The best I could do was get it to display a single entry.

I realize there are other modifications out there that do this within the boundries of vB. They don't serve my purpose though.

This one allows me to quickly reuse the same information, except output different forums in a different file. This is what I need.

Any chance you could make this a variable or show me how to make it a variable that I could toss into custom templates I have created? (I already include the global file in THIS modification and output the template below this code. I would like the ability to insert this code though into the templates.

Thanks for any input you could give.

Unfortunately I'm not too familiar with vBulletin variable and such. If you want to take this script and work with it or have another person work with it just let me know.
Quote:

Originally Posted by ricker (Post 1211455)
Great script! Thanks! I'm looking to send you over a donation, but Paypal is acting up. Any chance you can add a "donation" link in your post? You may get more clicks.

Keep rockin!
Sarah

Thanks, "ricker" :)

ZomgStuff 03-27-2007 08:58 PM

Very nice!

firstrebel 06-02-2007 04:13 PM

Quote:

// use one or the other, not both. if left blank the script will return threads from any forum
$fid_raw = "14"; // ONLY include threads from these forums. seperate each ID with a comma
$fidx_raw = ""; // Exclude threads from these forum. seperate each ID with a comma
This is not working in vB 3.6.7PL1. No matter which forum ID I use it returns the last 10 from all forums.

Bob

Rich 06-09-2007 03:09 PM

Quote:

Originally Posted by firstrebel (Post 1259844)
This is not working in vB 3.6.7PL1. No matter which forum ID I use it returns the last 10 from all forums.

Bob

A work around would be to input the forums that wish NOT to display. The location to do that is directly below the location where you input the forums you DO wish to display.

jags2ooo 06-23-2007 06:31 AM

wow this looks great, wondering can i get it to show the full post as well as the topic ?

amnesia623 08-29-2007 08:34 AM

Quote:

Originally Posted by Rich (Post 1210711)
I have a request that would benefit me greatly. I am using this modification, or will be anyways, ON vBulletin powered pages. I would LOVE to have this as a variable. My attempts so far have failed at making it function as one though. The best I could do was get it to display a single entry.

I realize there are other modifications out there that do this within the boundries of vB. They don't serve my purpose though.

This one allows me to quickly reuse the same information, except output different forums in a different file. This is what I need.

Any chance you could make this a variable or show me how to make it a variable that I could toss into custom templates I have created? (I already include the global file in THIS modification and output the template below this code. I would like the ability to insert this code though into the templates.

Thanks for any input you could give.

if you use the directions here -> http://www.vbulletin.com/forum/showthread.php?t=173937 and include the file as a plugin you can sort of achieve this. would love to know how to just have the code in the plugin instead of calling a file.... but it's a working solution until others follow

amnesia623 08-29-2007 08:40 AM

do you know how cool this is? rock the house baby!

xBhp 09-06-2007 02:34 PM

Despite my best of efforts I could not make it display posts only from a single forum. It still displays recent posts from all forums.

ahmedbehiry 10-17-2007 09:42 AM

grate hack.. but I also can't use it to show posts from specific forums.. hopefully this will be fixed soon as I really need to install it :(

Tomzl 10-22-2007 07:03 PM

I recently updated the script from 1.02 to 1.03 and some problems occured.

I changed the default code to suit my needs (utf-8, different style, max 30 chars in topic title etc.). I applied the same changes that worked in 1.02 to 1.03 but now every once in a while there are two arrows in front of one topic title. I added an arrow .gif in front of every topic title so it links to the newpost in that topic. For some reason this arrow is doubled by one of the topics on the list. It is not always the same topic and I can't find a rule that triggers this behaviour.

Below is my modified code. Help would be much appreciated.

Code:

## NO NEED TO TOUCH ANYTHING BELOW    #####################################
#############################################################################

if (!($recent_topics_connection = mysql_connect("$db_host", "$db_user", "$db_pw")))
die ("could not connect"); 
if (!(mysql_select_db("$db_name", $recent_topics_connection)))
mysql_error();
mysql_query('set names utf8');
mysql_query('set character set utf8');
$fid_array = explode (',', $fid_raw);
if ($fid_raw)  {
    $fid_final .= "AND (";
    foreach( $fid_array as $key => $value){
        if ($key == 0) { $fid_final .= "t.forumid=".$value; }
        else { $fid_final .= " OR t.forumid=".$value; }
    }
    $fid_final .= ")";
}
$fidx_array = explode (',', $fidx_raw);
if ($fidx_raw)  {
    $fidx_final .= "AND NOT (";
    foreach( $fidx_array as $key => $value){
        if ($key == 0) { $fidx_final .= "t.forumid=".$value; }
        else { $fidx_final .= " OR t.forumid=".$value; }
    }
    $fidx_final .= ")";
}
$thread_sql = mysql_query("SELECT SQL_CACHE t.threadid,t.title,t.lastpost,t.lastposter,t.forumid,substring(p.pagetext,1,200) as post_text
    FROM ".$GLOBALS['db_prefix']."thread t
    INNER JOIN ".$GLOBALS['db_prefix']."post p
    ON t.firstpostid = p.postid
    WHERE t.visible=1 
    AND t.open=1 $fidi_final $fidx_final 
    ORDER BY t.lastpost desc 
    LIMIT $limit");
while($thread_get=@mysql_fetch_array($thread_sql))
{
    $lastpost = $thread_get['lastpost'];
    $poster = $thread_get['lastposter'];
    $tid = $thread_get['threadid'];
$text = $thread_get['post_text'];
    if ($post_date_format == "1") { $date2 = date ("m/d/y h:i A" ,$lastpost); }
    elseif ($post_date_format == "2") { $date2 = date ("h:i A" ,$lastpost); }
    else { $date2 = date ("m/d/y h:i A" ,$lastpost); }
        echo "&nbsp;<a href=\"$forum_url/showthread.php?t=$tid&goto=newpost\" class=\"povezava\" target=\"_parent\"><img src=\"arrow.gif\" border=\"0\" align=\"absmiddle\">&nbsp;</a>";
                echo "&nbsp;<a href=\"$forum_url/showthread.php?t=$tid\" class=\"povezava\" target=\"_parent\" title=\"".$text."\">";
                if (strlen($thread_get[title])>30) echo substr($thread_get[title],0,30)."...";
                else echo $thread_get[title];
                echo "</a><br />\n";
}
mysql_close($recent_topics_connection);
?>


Tomzl 10-22-2007 07:32 PM

The problem occurs when the preview text of the topic includes " in the text. This seems to mess up the output.

ceint 02-26-2008 08:45 AM

How do I go about making the the links to the topics SEO friendly? My forum is using Zoints SEO.

martinc126 02-26-2008 04:24 PM

Hi,

How would i make it so the time is GMT, The forum is set to us GMT but the script wont show the time the forum is showing.

Martin

tspore 03-08-2008 09:05 PM

A very nice script - I was wondering it looks like - ORDER BY t.lastpost desc
shows the last comments. Can I change it so that it would order by the original post time in the thread. So that the order is from what I post time, and when people comment on an item it doesn't mess up the ordering that I had them in.

umusic2000 03-13-2008 07:32 AM

This works well but how do you get the links to open up in a new window or the parent window using an iframe?

LBmtb 09-09-2008 07:49 AM

Posted an update here: https://vborg.vbsupport.ru/showthread.php?t=190425

thanks,

microdot 09-13-2008 08:14 AM

Hi this is a great mod, thank you! I have to use this one because my site is php4 so I wonder.. is there anyway to give it an offset, so it can exclude the most recent 5 topics?

This is will allow for a 2 or 3 column layout.

Thanks again

microdot 09-26-2008 02:36 PM

OK.. so offset then.

Is it possible to display a group of boards.. for example I have board 5 with sub boards inside it.. it is possible to display the main board AND the sub boards?

Thanks for your help, looking forward to using this.

CorneliusW 10-28-2008 11:57 PM

I just download version 1.03 and it only outputs
Quote:

recent topics by SocalTrailRiders.org
I saw the previous comments but those were for the older versions so it doens't apply to me + there are three "$fid_array".

Can you please help. Thanks!

BTW database information is correct. Checked about 20 times.

JohorBahru 02-16-2009 02:03 PM

could i put this on my vbulletin homepage?
because it seems like more flexible than other recent topic mod

varkjie 07-08-2009 03:21 AM

This may be a stupid question..... but my main site is currently html, how can I apply this php code on an html site? if I can't then how I can I make it's own directory where it will run as a php?
I tried making a directry and uploading the code in it's own file as test.php and it didn't work... not sure what else I should be trying?

Thanks

netdreams 02-02-2010 05:03 AM

hey that work for me
nw i need one help
pls tell me that hw to add latest blog post in non-vb page

any help would be appriciated

thank u


All times are GMT. The time now is 08:29 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.01301 seconds
  • Memory Usage 1,851KB
  • 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
  • (2)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)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