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)
-   -   vBExternal v1.6 (https://vborg.vbsupport.ru/showthread.php?t=83005)

nokturno 10-27-2005 01:36 PM

cool!!

subnet_rx 10-29-2005 06:18 PM

I would still like to see a calendar function added to this :)

Daniel 10-29-2005 06:21 PM

Code:

Warning: main(./includes/db_mysql.php): failed to open stream: No such file or directory in /home/nikzad0/public_html/forum/vBExternal.php on line 67

Fatal error: main(): Failed opening required './includes/db_mysql.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nikzad0/public_html/forum/vBExternal.php on line 67

Any idea what I did wrong?

Simms 10-29-2005 10:37 PM

Quote:

Originally Posted by jugo
Change this line (towards the end of the file):

Code:

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

Code:

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

Delayed response, but wanted to let you know this worked perfectly. Thanks!

Xtrm2Matt 11-04-2005 09:40 PM

Quote:

Originally Posted by jugo
@Xtrm2matt does it still give you an error if so, please post your vBExternal here so I can hae a look.

People...if you want to pull threads from another site's vBulletin install use EXTERNAL.PHP

I seem to have gotten it fixed now :)

Thanks for all the help,

Matt

apdcanari 11-05-2005 03:52 PM

Hello,

How to post the total number members and posts on a page of its site?

For example : The forum had 55.000 posts and 2.000 members

My code with Vbulletin 3.0.7

Count member
PHP Code:

<?php
$countposts
=$DB_site->query_first('SELECT COUNT(*) AS posts FROM vb3_post');
$totalposts=number_format($countposts['posts']);
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM vb3_user');
$numbermembers=number_format($numbersmembers['users']);
echo 
"$numbermembers";
?>

Count Posts
PHP Code:

<?php
$countposts
=$DB_site->query_first('SELECT COUNT(*) AS posts FROM vb3_post');
$totalposts=number_format($countposts['posts']);
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM vb3_user');
$numbermembers=number_format($numbersmembers['users']);
echo 
"$totalposts";
?>

Thank you very much,

Good evening

C?dric

PS : I'm french and i don't speak English very well... :ermm:

Xtrm2Matt 11-05-2005 04:36 PM

Quote:

Originally Posted by apdcanari
Hello,

How to post the total number members and posts on a page of its site?

For example : The forum had 55.000 posts and 2.000 members

My code with Vbulletin 3.0.7

Count member
PHP Code:

.. 

Count Posts
PHP Code:

.. 

Thank you very much,

Good evening

C?dric

PS : I'm french and i don't speak English very well... :ermm:

I fixed your script for you -> http://www.opticalgaming.com/forums/test2.php

Code changes:

PHP Code:

<?php 
$countposts
=$vbulletin->db->query_first('SELECT COUNT(*) AS posts FROM prefix_post'); 
$totalposts=number_format($countposts['posts']); 
$numbersmembers=$vbulletin->db->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM prefix_user'); 
$numbermembers=number_format($numbersmembers['users']); 
echo 
"Total Posts: $totalposts";
echo 
"<br>";
echo 
"Total Members: $numbermembers";
?>

I made a small change - didn't see the need for 2 scripts where 1 could be used.

Hope this helps :)

Matt

apdcanari 11-05-2005 04:48 PM

Thanks a lot !!!

It's ok

Cédric :nervous:

gopherhockey 11-07-2005 01:34 PM

Nice!

Xtrm2Matt 11-07-2005 02:03 PM

Lovely edit there, gopher!! :P Was about to reply!!

Back on topic..

Will there be any further extensions to this? I love it and would like to see a bit more :) Possible following on from the news.. how about a Poll-pulling function?

Hard to explain, but: I have a "dedicated poll forum" on my forum where polls are (and can only be) created. Would it be possible to pull the latest poll made by -->AN ADMIN<-- (would work by specifying the Admin usergroup or a group that could display polls on the front page?) and have it put it on the front page?

Hope it's clear :)

Matt

blue6995 11-10-2005 04:28 PM

I am obviously doing something wrong - I keep getting this message when trying to open a test webpage I produced calling vb stats

Warning: main(./includes/db_mysql.php): failed to open stream: No such file or directory in /homepages/18/d121175559/htdocs/vBulletin/vBExternal.php on line 67

Fatal error: main(): Failed opening required './includes/db_mysql.php' (include_path='.:/usr/local/lib/php') in /homepages/18/d121175559/htdocs/vBulletin/vBExternal.php on line 67

Any idea what is wrong?

i-Symbian.Com 11-11-2005 04:44 PM

Great Hack!!!

3 questions :-

1. How to display News from multiple forum ids?

################################################## #
# Displaying News

<?php
output_News(5,4);
?>

# Change '5' to the amount you want to show
# Change '4' to the forum id you want to pull
# news from (must be set - only 1 forum id allowed)
################################################## #

2. How to display time of the post in the News?

3. How to limit characters in the News to a specified number. e.g. the first1500 characters and add a "Read more"?

Cheers!

:)

majorxp 11-14-2005 09:22 PM

Quote:

Originally Posted by azmi
is it possible to display the message in the last news ?
maybe like in the last X posts 3.1 ?

I would love to know this as well.

mikehawk 11-14-2005 09:34 PM

Warning: main(./realboards/vBExternal.php): failed to open stream: No such file or directory in /home/.gambia/realopin/realopinion.com/index.php on line 3

Fatal error: main(): Failed opening required './realboards/vBExternal.php' (include_path='.:/usr/local/lib/php') in /home/.gambia/realopin/realopinion.com/index.php on line 3

:ermm:

mikehawk 11-14-2005 09:57 PM

Alright it is now working on my index.

Now, how do I change the font, etc? It is taken strictly from my html code specs in my index.html or from VBexternal.php?

mikehawk 11-14-2005 10:00 PM

NVM, i'm an idiot. :disappointed:

BassX 11-15-2005 03:58 PM

Quote:

Originally Posted by i-Symbian.Com
2. How to display time of the post in the News?

Cheers!

:)

Find the following in ouput_News()

PHP Code:

array(
        
'threadid'     => $News['threadid'],
        
'threadname' => $News['title'],
        
'postuserid' => $News['postuserid'],
        
'postusername' => $News['postusername'],
        
'post'         => $bbcode_parser->parse(unhtmlspecialchars($News['pagetext']), $f),
        
'comments'     => vb_number_format($News['replycount']),


And add the following to the array:
PHP Code:

'date'     => vbdate($vbulletin->options['dateformat'], $News['dateline']),
'time'     => vbdate($vbulletin->options['timeformat'], $News['dateline']), 


Then add date and time to your template.

xug 11-16-2005 12:47 AM

Would be cool if this could be updated to vB 3.5.1 ;)

i-Symbian.Com 11-16-2005 05:10 AM

@BassX,

Thanks a million! :D

xug

I'm using vb 3.51 and it works perfectly! ;)

Cheers!

i-Symbian.Com 11-16-2005 07:18 AM

I will answer my own question here ;)

How to limit News to certain characters?

Open vBexternal.php

Find

PHP Code:

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

Replace with
PHP Code:

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

Change 250 to any numbers you wish and this will be pulled from the database.

Cheers!

Dontom 11-16-2005 01:55 PM

any chance to get the script fixed itself? I do not have any of the older vb3.5 files here
Thomas

Xtrm2Matt 11-16-2005 07:59 PM

Just had an idea.

Is there any possibilty of adding a number to users online? Such as:

Users online: 1
- Xtrm2Matt

Users online: 2
- Xtrm2Matt
- Joe

etc etc.

Thanks :)
Matt

1nsane 11-16-2005 10:20 PM

Wow! awesome! This was just what I needed! Now my clan site looks just about perfect (www.dcsclan.net) Thanks alot!

Sol_Invictus 11-19-2005 09:19 PM

It doesn't seem to work on 3.5.1. It just gives some errors:

Quote:

<!--
Database error in vBulletin :

mysql_connect(): Access denied for user: '(mypasswordgoeshere?wtf)@localhost' (Using password: YES)
/home/user52/public_html/forum/includes/class_core.php on line 273

MySQL Error :
Error Number :
Date : Saturday, November 19th 2005 @ 05:16:35 PM
Script : http://www.(mysitesurl).com/forum/vBExternal.php
Referrer :
IP Address : (my ip cleared for privacy reasons)
Username :
Classname : vb_database
-->

Xtrm2Matt 11-19-2005 09:25 PM

Works fine on my vB 3.5.1.

You need to look back on page ~4 for the fix for that, Sol.

Matt

Sol_Invictus 11-19-2005 10:02 PM

WOW. It works great! Thanks.

allstar77 11-20-2005 05:09 AM

Hi, the script works great, but when i put the script in my php template, i become errors with my template:

Quote:

Warning: main(./content/news.php): failed to open stream: No such file or directory in /www/htdocs/nfslogin/index.php on line 100

Warning: main(./content/news.php): failed to open stream: No such file or directory in /www/htdocs/nfslogin/index.php on line 100

Fatal error: main(): Failed opening required './content/news.php' (include_path='.:/usr/share/php:..') in /www/htdocs/nfslogin/index.php on line 100
Line 100 is this:
PHP Code:

require $aufruf[$script['kat'] ].".php"

What can i do ?

irishblacknight 11-20-2005 11:02 AM

Quote:

Originally Posted by Sol_Invictus
WOW. It works great! Thanks.

Is there a fix that doesn't use the older core files???

welo 11-20-2005 02:38 PM

<a href="https://vborg.vbsupport.ru/showpost.php?p=790013&postcount=77" target="_blank">This fixes it</a>.

allstar77 11-21-2005 03:26 PM

Please help :(

Eggie 11-25-2005 12:04 AM

Sorry, but does vbexternal.php and the vbexternal folder go into /public_html for my portal index I'm trying to create or in my /forums folder where vB is? I tried both but only get a blank page

Eggie 11-26-2005 05:03 AM

anyone???

RealityDesign 11-26-2005 08:01 AM

"$config['MasterServer']['servername']," is not anywhere in my vbexternal.php :(

Do I have some messed up version? I just downloaded it 5 mins ago so I would asume it's up to date...

Anyway, because I cannot find that line, I cannot apply the fix.

RealityDesign 11-26-2005 08:07 AM

Re-downloaded the hack and the vbexternal.php file was a different size after I unzipped it. Opened it up, and the line I needed was there this time. VERY WEIRD.

Anyway, it works!

Thanks :)

Milez 12-01-2005 08:23 AM

Any chance of pulling news from more than 1 forum ID? Please please.

mathias 12-04-2005 10:02 PM

on newestthread I want to limit the characters how can I do that?

jugo 12-05-2005 02:04 AM

Quote:

Originally Posted by Eggie
Sorry, but does vbexternal.php and the vbexternal folder go into /public_html for my portal index I'm trying to create or in my /forums folder where vB is? I tried both but only get a blank page

Everything goes in your forums dir.

Quote:

Originally Posted by Milez
Any chance of pulling news from more than 1 forum ID? Please please.

Yes... Just let me know which function and i'll generate the code for you.

Quote:

Originally Posted by mathias
on newestthread I want to limit the characters how can I do that?

if you mean in the thread title....
change this:

Code:

'threadname'  => $Thread['title'],
to this (the 20 is the number of characters to display):
Code:

substr($Thread['title'],0,20),

jugo 12-05-2005 02:09 AM

Quote:

Originally Posted by mikehawk
Alright it is now working on my index.


Now, how do I change the font, etc? It is taken strictly from my html code specs in my index.html or from VBexternal.php?

USE CSS. Very Simple.

wiredinoc 12-07-2005 05:56 AM

Quote:

Originally Posted by Xtrm2Matt
I fixed your script for you -> http://www.opticalgaming.com/forums/test2.php

Code changes:

PHP Code:

<?php 
$countposts
=$vbulletin->db->query_first('SELECT COUNT(*) AS posts FROM prefix_post'); 
$totalposts=number_format($countposts['posts']); 
$numbersmembers=$vbulletin->db->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM prefix_user'); 
$numbermembers=number_format($numbersmembers['users']); 
echo 
"Total Posts: $totalposts";
echo 
"<br>";
echo 
"Total Members: $numbermembers";
?>



Quote:

Originally Posted by i-Symbian.Com
I will answer my own question here ;)

How to limit News to certain characters?

Open vBexternal.php

Find

PHP Code:

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

Replace with
PHP Code:

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

Change 250 to any numbers you wish and this will be pulled from the database.


Guys, this kicks complete ass! I'm a new user, but I'm quickly getting up to speed with the help of you fine folks!!

I have 2 questions:

1. Considering the code above, how would I apply it to the title of latest posts, and display "..." if the title goes beyond the desired limit?

2. Where do I place the "total members" code above? I'm kinda at a loss with this one. Does it go into vbexternal.php? How is it called?

Thanks soo much guys, this is awesome.

MD

Freakpyromaniac 12-09-2005 10:35 AM

The script is working fine, thanks!

But i still have one problem!

It disabled another script which i was using in the website:

PHP Code:

      <?PHP
                          

function checkPage($page) {
    
//Controle
    
if($page=="index") return false;
    
$page.=".php";
    return 
file_exists($page);
}


$page=$_GET['page'];

if(!isset(
$page) || empty($page)) $page="nl/home";

if(
checkPage($page)) include($page.".php");

?>



it is just a page script,but not working anymore when i put:

PHP Code:

<?php
chdir
("../../HTML/testforum/");
include(
'./vBExternal.php'); 
?>

in the head of the index.

Anybody know the reason, and has a solution?


All times are GMT. The time now is 07:43 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.01868 seconds
  • Memory Usage 1,880KB
  • 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
  • (5)bbcode_code_printable
  • (15)bbcode_php_printable
  • (14)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