The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vBulletin integration help?
Hello,
I'm doing a massive vBulletin integration project, however whenever I try to create pages including global.php (so I can use vbulletin variables etc) I get the following error. Code:
Warning: require_once(/home/xxxxx/subdomains/xxxx/includes/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxx/subdomains/xxxx/forums/global.php on line 23 Fatal error: require_once() [function.require]: Failed opening required '/home/xxxx/subdomains/xxxx/includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxx/subdomains/xxxx/forums/global.php on line 23 If anyone could help me this would be great. By the way, the way I currently have it setup is as follows http://www.my.com/forums = the forums, and where global.php is stored http://www.my.com/ = website i'm trying to integrate with, and is where I'm trying to include('./forums/global.php'); from And the forums work fine. |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
thanks that worked perfectly.
Is there a variable that shows how many users are online? or is that something that I will have to code, and if so where is this information stored in the database? |
#4
|
||||
|
||||
Look near the end of index.php - that contains the code to fetch currently active users.
|
#5
|
|||
|
|||
Thanks, that worked perfectly (as always).
The next thing I'm trying to do is figure out new posts, what I'm trying to do is make a column on the left of the page with new posts that the user has not read. I've figured out how to display posts that are the newest in general, but not what is the newest to that user or if this is even possible. Any help is appreciated. Thanks again Dismount, you're a life saver |
#6
|
|||
|
|||
You can use the variable $vbulletin->userinfo["lastvisit"] which returns a timestamp from the user's last forum visit. From there, select posts with a timestamp GREATER THAN that. An example query (very, VERY basic) would be...
Code:
SELECT * FROM post WHERE dateline > ". $vbulletin->userinfo["lastvisit"] ." ORDER BY dateline DESC LIMIT 0, 10 |
#7
|
|||
|
|||
I'd like to do sorta like what the vBa CMPS does where it displays the newest posts, and then bolds the ones that the user hasn't viewed yet, I just can't think of how to do it. By the way, in case it makes any difference to how this would be done I have the "Thread/Forum Read Marking Type" set to "Database (automatic forum marking)"
Thanks again to all that help |
#8
|
||||
|
||||
The read markers are tricky. What I suggest is to look inside forumdisplay.php and see how vBulletin determines the read status.
|
#9
|
|||
|
|||
I actually can't find it in that file, you mind sending me the lines where it can be found (I know you can't post part of the file... or can you?)
Anyway thanks again for all your help --------------- Added [DATE]1246302266[/DATE] at [TIME]1246302266[/TIME] --------------- also, how do you get vbmenu_register to work outside of vbulletin run pages, for instance on my homepage... this time I'll provide a link so you can see what I'm trying to do. http://sdev.pcprobs.org/ anyway the QuickLinks dropdown only works on pages that are run by vBulletin, even though I have included all of the javascript files, in the same order as on all of the vBulletin pages, but it still doesn't work. It only shows up for registered users, so you'll have to register (email activation is off) Any help with this is appreciated. Thanks |
#10
|
||||
|
||||
Quote:
PHP Code:
PHP Code:
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|