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)
-   -   Major Additions - [ITech] vBExternal Lite (https://vborg.vbsupport.ru/showthread.php?t=147344)

djilou 08-22-2007 11:15 PM

Quote:

Originally Posted by azn_romeo_4u (Post 1315984)
yea i have this on my website

www.flyffworld.com Fully customizable btw. Works nicely. Anyone know if this works on the latest version of vb?

Awesome!
can you tell me how did you managed to display just a certain number of characters from the post on my news page?

thanks!

azn_romeo_4u 09-06-2007 07:43 PM

PHP Code:

array(
                                
'threadid'     => $News['threadid'],
                                
'threadname'   => $News['title'],
                                
'postuserid'   => $News['postuserid'],
                                
'postusername' => $News['postusername'],
                                
'post'         => $bbcode_parser->parse(unhtmlspecialchars(substr ($News['pagetext'],0,900)), $f), 
                                
'comments'     => vb_number_format($News['replycount']),
                                
'date'            => vbdate($vbulletin->options['dateformat'], $News['dateline']),
                                
'time'            => vbdate($vbulletin->options['timeformat'], $News['dateline']), 

I added

'post' => $bbcode_parser->parse(unhtmlspecialchars(substr ($News['pagetext'],0,900)), $f),

this to vbexternal. Change the 900 number to whatever u want. the ... you see at the end. I had to manually add that in there. LOL.

anyone know if this works in the lastest version? can anyone recommend me a script that is flexible like this?

Pacman15 09-07-2007 12:05 PM

There is one thing not working thought... I had to set my 'news forum' to put in moderation queue the threads created by members, so that it wouldn't show stupid things on my main page, but it doesn't work. Even if the thread is not aproved yet, it will apear on the main page.

Do you have any idea in how to fix that?

My temporary solution was to create a sub-forum 'propose news', so whenever I like a news from my members I'd move it to the main 'News Forum'. :D

PeteBlume 09-07-2007 12:40 PM

Is there any possibility to show the news in a template? Fpr example: I want to show 1 news-post in the template threadbit under the first post?

Do you know whta I mean? Can you help me?

azn_romeo_4u 09-07-2007 05:28 PM

Quote:

Originally Posted by Pacman15 (Post 1334198)
There is one thing not working thought... I had to set my 'news forum' to put in moderation queue the threads created by members, so that it wouldn't show stupid things on my main page, but it doesn't work. Even if the thread is not aproved yet, it will apear on the main page.

Do you have any idea in how to fix that?

My temporary solution was to create a sub-forum 'propose news', so whenever I like a news from my members I'd move it to the main 'News Forum'. :D

Just don't give permission to your members to post in that particular forum.

So does that mean on your board this works on 3.6.8?

txsbmw 09-07-2007 06:39 PM

Quote:

Originally Posted by azn_romeo_4u (Post 1334357)
Just don't give permission to your members to post in that particular forum.

So does that mean on your board this works on 3.6.8?

I run 3.6.8 and it works like a charm.

Mikhailtech 09-10-2007 07:55 PM

Can someone help me exclude a specific forum from the results? I have a forum that's just for mods/admins and is invisible to normal users, but the thread titles from this forum still show up in VBE. What code modification would I have to make to exclude this particular forum from the new threads/new posts results?

koby411 09-12-2007 08:55 AM

Is there someway I can combine this with this mod:
https://vborg.vbsupport.ru/showthread.php?t=99925
To give the news categories?
Like so on the news it can say
Filed Under: Square Enix
or w/e?

jGas 09-12-2007 11:44 AM

it's a very good mod...does it works with myspace?

i'd like to insert the last posts and news on "my" myspace page...

koby411 09-13-2007 03:21 PM

How to do I get this:


<?php
chdir('./forums');
require_once('./vBExternal.php');
?>

Set right if my sites are like this:

Forum:
forgottenmem/forums

Site:
khtrinity


I tried using this:

<?php
chdir('../forgottenmem/forums');
require_once('./vBExternal.php');
?>

but it didn't work.. O.o

Okay got it working now, but I have another problem..

When I put an image into the news.html template like:
http://forgottenmem.net/images/news_arrow.gif

When it shows the news on the site it changes that link to:
http://forgottenmem.net/http://forum...news_arrow.gif

Why is it adding that in the middle of the link? O.o

Kitara79 09-14-2007 03:05 PM

Works so far for me, but the Output ignores all
Code:

[quote] or [PHP] etc.
Tags. They are simply not shown. I think the Problem is, that they use their own templates and the script does not get them?

Does someone has any idea?

Archaic Sage 09-17-2007 11:55 AM

Is there any chance of a "Read More" option being added for this?

Koroku 09-26-2007 06:08 AM

Very nice!! It's just what I was looking for.

If anyone wants an avatar, you can use this:
<img src='{url}/image.php?u={postuserid}' alt='Avatar' />

steveneff 09-29-2007 03:24 PM

Hi all, This mod looks great.

Anyone got it working with phpnuke module in the home page and vb in /forum?

skepticality 09-29-2007 03:46 PM

Great addition to my own vBulletin system! This should be a 'standard' feature in the system out of the 'box'! :D

JtChurch925 09-29-2007 05:08 PM

I'm excited! This is exactly what I was looking for.
But, i'm a bit lost.

What I was hoping to use this for was to populate some sidebar boxes on the same page as my forum.

Ive dropped in the head code:
<?php
require_once('vBExternal.php');
?>


And I drop the output code into my sidebar box...
But I get a blank sidebar, nothing had changed.
Here is the code for the sidebar, perhaps you can see my mistake?

<table>
<div class="thead" align="left">Newest Member</div>
<td height="125px" class="lftbox1" height="25px"><?php
output_NewestMembers(1);
?></td>
</table>


Visually the box (or I should say 'table' in this case), appears as I want it to, with the one noticeable exception being that is is empty!

Any thoughts? :(

steveneff 09-29-2007 06:11 PM

Hi JtChurch925,

Looks similar to my problem with phpnuke

I've got it working by adding forum/ to the includes in vBExternal.php but it stops the rest of nuke from finishing, I think its a dir problem.

JtChurch925 09-29-2007 06:40 PM

Thanx for replying Steveneff,

I would be willing to try anything.
I'm guessing that you're referring to the code inside vBExternal.php
Looking at the code though im not shure what you mean by adding forum/

if( !file_exists('./includes/config.php'))
{
echo "includes/config.php does not exist. Cannot continue.";
exit;
}

require_once('./includes/class_core.php');
require('./includes/config.php');


is forum/ going in the place of the ./ ?

Again, I appreciate your reply. :)

steveneff 09-29-2007 06:49 PM

Quote:

Originally Posted by JtChurch925 (Post 1349770)
is forum/ going in the place of the ./ ?

Again, I appreciate your reply. :)

only if that's where your vb is.

JtChurch925 09-29-2007 06:56 PM

yep, it's forum/ for me.

I'll try that and let you know how it goes,
Going replace ./ with forum/ all the way down.

<!-- Fingers Crossed -->

JtChurch925 09-29-2007 07:08 PM

<sigh>

...bupkis, nothing, nada...

I assume this must have something to do with the fact that I am trying to display the information on the same page as the forum -and so you'd be right about it be a linkage (or directory) problem.

I also have a main page built in Joomla, and it will display there ok.
-of course the head code for that page is:
<?php
chdir('./forum');
require_once('./vBExternal.php');
?>

because it's a different directory.
but I drop in the php output code on that page and it works just fine.

but nothin' doin' on http://n81street.com/forum/index.php
hrmmm... :confused:

Koroku 09-29-2007 10:59 PM

I'm no master, but I don't think you need the chdir at all if you're including vBExternal.php in the same directory.

steveneff 09-30-2007 03:39 PM

Got this working in a nuke module.

in modules/mymodule/index.php

PHP Code:

chdir('./forum'); 
require_once(
'./vBExternal.php'); 
output_NewestThreads(5,'1,2,3');
chdir('../'); 


in vBExternal.php change each instance of $db to $vbdb

Not sure if this is the right thing to do but it works :)

Anyone know how to list a preview of each tread?

JtChurch925 09-30-2007 10:25 PM

Quote:

Originally Posted by Koroku (Post 1349885)
I'm no master, but I don't think you need the chdir at all if you're including vBExternal.php in the same directory.

Yep, if you check my posts you'll see I removed chdir for the forum page. Added it for the J!hompage.

Congrats on getting it working steveneff, I'm jealous, tried changing the $db to $vbdb and that didnt seem to help either.

:confused:

steveneff 10-01-2007 02:51 PM

I've managed to get the post text displayed with the code below but would now like to add the parent forum.

PHP Code:

    // ---------------------------------------------------
    // FUNCTION: output_NewestThreads
    // DETAIL:   Outputs X newest threads ordered by
        //           start date descending. $a
    //           specifies amount to show (Default 5)
        //           and $f can specify certain forums
    //           to grab from (1,3,4), by default it pulls
        //           from all forums.
    // ---------------------------------------------------

    
function output_NewestThreads($a 5,$f ""){
    global 
$db$Data$vbulletin;
    
    
// Define amount to show
    
$Amount = ($a)? intval($a) : 5;

    
// Define Forum(s) To Pull From
    
$Forums = ($f)? $f'';
    
$SQL    '';

        if(
$Forums){
        
$SQL " where forumid in({$Forums})";
        }

    
// Load Template
    
$Template LoadTemplate("newest_threads.html");

//     Collect Data
        
$NewestThreads $db->query("
            select t.*,p.pagetext
            from "
.TABLE_PREFIX."thread t
            left join "
.TABLE_PREFIX."post p on(p.postid=t.firstpostid)
            
{$SQL} 
            order by dateline desc
            limit 0,
$Amount");

        
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());

        while(
$Thread $db->fetch_array($NewestThreads)){
        
$Data .= ParseTemplate($Template,
                            array(
                                
'threadid'     => $Thread['threadid'],
                                
'threadname'   => $Thread['title'],
                                
'postuserid'   => $Thread['postuserid'],
                                
'postusername' => $Thread['postusername'],
                                
'post'         => $bbcode_parser->parse(unhtmlspecialchars
                                
(substr ($Thread['pagetext'],0,101)), $f), 

                                
'replies'      => vb_number_format($Thread['replycount']),
                                
'views'        => vb_number_format($Thread['views']),
                                
'lastposter'   => $Thread['lastposter'],
                            )
            );
        }

    
doOutput();
    } 


Anyone done this already?

bangthebook 10-01-2007 05:40 PM

What has to be edited to control the length of the thread title? I dont see an option and I havent seen it pointed out.

Also anyone get this working with VBSEO?

steveneff 10-01-2007 09:40 PM

Quote:

Originally Posted by bangthebook (Post 1350863)
What has to be edited to control the length of the thread title? I dont see an option and I havent seen it pointed out.

Try this, where 100 = amount of characters

PHP Code:

'threadname'   => (substr ($Thread['title'],0,100)) 


Stratto 11-04-2007 08:25 PM

I liked this, its really good! And easy to code, thanks ^^

Oh I don't know if anyone else has posted but I added a printable option and to reply to the post.

Add reply
Code:

<a href='{url}/newreply.php?do=newreply&noquote=1&p={threadid}'>
Comments: {comments}</a>

Print Article
Code:

<a href='{url}/printthread.php?t={threadid}' target='_new'> <small>Print Article</small></a>
Once again, thanks I've been looking for this since..forever XD

SilentNoise 11-08-2007 01:12 PM

Dude! You just made my year with this hack!

Goodbye vBAdvanced!.... you boxy, boooooring POS!

rwoscott 11-09-2007 07:16 AM

Finally got it to work, thanks mate.

Gladius2007 12-01-2007 03:55 PM

Thanks for a great mod! I'd really like to show the number of guest users along with the registered members online too, though. Has no one figured out how to do this?

I'd also appreciate it if someone could post how we can list only the forums we want to EXCLUDE from the newest threads and newest replies... with a few dozen forums listing all of them but 2 or 3 isn't really practical.

Archaic Sage 12-09-2007 03:27 PM

Anyone know the solution to the problem with images?

When I add an image via HTML or through IMG tag it always adds my forums url before the image again. So it ends up being http://www.domain.ext/http://www.dom.../filename.file.

The news page is:
PHP Code:

<?php
chdir
('./forums');
require_once(
'./vBExternal.php');
?>


Gladius2007 12-15-2007 01:38 PM

Comment out this line:

$Data = str_replace('images/',"{$vbulletin->options[bburl]}/images/",$Data);

Charmedfan 12-16-2007 08:29 PM

Hey,
it is an awesome addon! I love it but I have one question:
Is it possible to add more then one forumID to the news section? Because I have more than one news forum. I really need it!

Thanks and greetings!

Charmedfan

gotfreebies 12-16-2007 10:25 PM

Hi,
I believe someone had asked this question already but did not get any answers.
I have my vBulletin Forum on a subdomain, but want to run this on my main directory.
How do I do it?
Calvin

Charmedfan 12-19-2007 06:52 PM

Hey,
I have another problem. I use this string for the date:

PHP Code:

'date'     => date("F j, Y, g:i a",$News['dateline']), 

I wrote it in this code part:

PHP Code:

 // ---------------------------------------------------
 // FUNCTION: output_NewestThreads
 // DETAIL:   Outputs X newest threads ordered by
        //           start date descending. $a
 //           specifies amount to show (Default 5)
        //           and $f can specify certain forums
 //           to grab from (1,3,4), by default it pulls
        //           from all forums.
 // ---------------------------------------------------
 
function output_NewestThreads($a 5,$f ""){
 global 
$db$Data$vbulletin;
 
// Define amount to show
 
$Amount = ($a)? intval($a) : 5;
 
// Define Forum(s) To Pull From
 
 
 
$Forums = ($f)? $f'';
 
$SQL    '';
  if(
$Forums){
  
$SQL " where forumid in({$Forums})";
  }
 
// Load Template
 
$Template LoadTemplate("newest_threads.html");
 
 
// Collect Data
 
$NewestThreads $db->query("select * from ".TABLE_PREFIX."thread{$SQL} order by dateline desc limit 0,$Amount");
  while(
$Thread $db->fetch_array($NewestThreads)){
  
$Data .= ParseTemplate($Template,
       array(
        
'threadid'     => $Thread['threadid'],
        
'threadname'   => $Thread['title'],
        
'postuserid'   => $Thread['postuserid'],
        
'postusername' => $Thread['postusername'],
        
'replies'      => vb_number_format($Thread['replycount']),
        
'views'        => vb_number_format($Thread['views']),
        
'lastposter'   => $Thread['lastposter'],
                                
'date'     => date("j. F Y, H:i",$News['dateline']),
       )
   );
  }

 
doOutput();
 } 

But the result only shows: 1. January 1970, 01:00 Not the actual date!?

Why?

Thanks for help!

Archaic Sage 12-20-2007 09:13 AM

Quote:

Originally Posted by Gladius2007 (Post 1401538)
Comment out this line:

$Data = str_replace('images/',"{$vbulletin->options[bburl]}/images/",$Data);

Worked a treat, thanks :)

!!!cyr0n_k0r 12-22-2007 08:46 PM

I'm trying to use vbexternal to pull data from a post, but all my code is stored inside a template. How can I call the news from within a vb template?

If I just add the output_News(5,4); straight to the PHP file it is displayed at the top of the page with no formatting.

Here is my php code that calls for the template where all the html is stored.

PHP Code:

eval('print_output("' fetch_template('Index') . '");'); 

How can I get the news to be called from the template "index" ??

Gladius2007 12-31-2007 04:13 PM

Has anyone figured out how to make it respect no conversion of text into smilies? It doesn't respect the post setting and converts text into smilies anyway...

odonel 01-04-2008 05:19 PM

what is the main difference between the pro and the lite version? will we be able to include capture images from the forums ?


All times are GMT. The time now is 10:24 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.01566 seconds
  • Memory Usage 1,894KB
  • 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
  • (3)bbcode_code_printable
  • (8)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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