![]() |
I have been trying to implement this hack, but since it's so scattered, I am having a hard time applying it.
If you can spare a moment, please tell me what I am doing wrong. 1. I've created "active.inc.php" file and uploaded into forum/admin. Code:
<?php Code:
<?php The problem is, nothing is showing up. Thanks -Hideki |
"default.html" should be "default.php" if you want to parse it as php
|
Menno, thanks for the reply,
I was under the impression that the entire purpose of this hack was to display vB elements on a non PHP page. Am I mistaken? So, people who have latest threads, total number of members, etc. on their homepage/front page are actually using default.php instead of default.htm? Thanks again. -Hideki :) |
The purpose is to display vB elements on non-vB pages. On my site, all the pages are *.php, as I run scripts on various pages throughout it.
Hope this helps :) |
Hes saying that in order to do that as a php command you need a php file.. in order to do it as a SSI command you should change your extension to .shtml and use
<!--#include virtual="../forums/admin/active.inc.php"--> I believe |
I don't know if that would work...calling a PHP file from a SSI. It might not parse the PHP...be interesting to try it and find out. ;)
|
It will work fine, the only thing Im unsure of is if it should be called like that. I used the code in sidebars which were in a subdirectory thus the [ ../forum/blah/ ]
|
Thanks guys,
I really appreciate your help. Hopefully it will work now. Question, I'm not too familiar with the .shtml extension. Could you give me a bit more info on it? Thanks -Hideki |
Yeah that's the correct syntax, except remove the .. so it looks like
Code:
<!--#include virtual="/forums/admin/active.inc.php"--> Code:
root [aka yoursite.com/] |
The SHTML or SHTM extension is for files that are server-parsed for SSI (server side includes). Basically it allows you to include stuff like the contents of another file, various stuff about the current file, and even execute scripts (CGI, PHP, etc) as we're doing in this case.
You can find more info here. ;) |
I have set it up that way, through SSI calls, and I can tell you it works just fine, as tubedogg said :)
I have been using this syntax without problems: Code:
<!--#include virtual="/forums/active.inc.php"--> |
good job tubedog :p
|
Thank you :D
I help where I can. ;) |
<seriously off-topic emotional outburst>
YES!!!!!!!! With that previous post I have become a Senior Member! YAY YAY YAY! </seriously off-topic emotional outburst> :D |
<seriously off-topic emotional outburst>
good job tubedogg </seriously off-topic emotional outburst> On another off topic note only 60+ more good job tubedoggs and I will also be a senior member :p |
Great! It finally worked.
Now, I've searched through the site, but could not find the codes for these. Does anybody know how to display polls and currently active users on non vb pages? Thanks again |
I got this beautiful little hack to work (not sure who to thank-but I thank whoever is responsible) :)
BUT, it seems to be showing even our private forums, including the moderators chat. NOT COOL. I had to take it down. Is there some modification that will stop any private forum from showing on this non-vb page? I know nothing about php, but I can follow good directions :D |
ok. I still know nothing about php :D
but, it seems to me that it shouldn't be difficult to add usergroups to this little hack. Anyone have any idea how this would be done? in other words: I'd like to be able to list the usergroups from whom this information is pulled. Here is the hack code, how would I make it so it only shows posts of, say... usergroup: members? Code:
<?php |
Well, here's some code to make it so it doesn't show threads private forums:
(I'm guessing this will work) Code:
SELECT * FROM thread LEFT JOIN forumpermission ON (forumpermission.forumid=thread.forumid) WHERE forumpermission.canview=1 ORDER BY lastpost DESC LIMIT 0,$maxthreads |
Ok, what I did was replace the code in the hack that resembled your suggestion :)
Now, it ONLY shows the private forums. I tried switching the word ON to OFF and it showed nothing when I did that. here is the modified code: Code:
<?php |
Code:
SELECT * FROM thread LEFT JOIN forumpermission ON (forumpermission.forumid=thread.forumid) WHERE forumpermission.canview=1 AND forumpermission.usergroupid=2 ORDER BY lastpost DESC LIMIT 0,$maxthreads ;) |
I do appreciate your help, but, it isn't working still.
when I changed it with your last suggestion, I get no output. Still hoping to find an answer for this. I can't believe this hasn't come up for anyone else using this hack! comon and help me out. I promise to be nice :D |
Ok, it took me this long to find it, but I did. My solution lies in tubedogg's fabulous last10 hack.
I wish I had known that yesterday! So, for those of you who don't know what I am talking about, tubedogg made this really cool, really customizable hack. here it is . Thanks tubedogg! |
ok, even though I very much like tubedoggs last10 hack, it doesn't show html tags properly in a mac environment. I cant change the text color or size or type in Nescape, and in IE, I cant change the color of the text.
So, I am back to this hack. :( This one I can controll the html tags really simply. So, is there anyone who can help me? I'd like to add a line that excludes whichever forums I list by number. That could make it simpler...no? |
I really liek the simplicity of this particular version of this hack. (that is it a simple list of the last threads.) I must, however, protect my private forums.
I have come up with this: Code:
Code:
$query = "SELECT * FROM thread ORDER BY lastpost DESC LIMIT $maxthreads"; to: Code:
$querylatest="select * from thread where forumid in ('113','120','97','98','112','114','117','122','93','95','107','110','101','102','103','104','105','111','100','96','99','94','116','108','115','118','123','106') order by lastpost desc limit $num_active"; I really like the output of this script (simple) but I must be able to control the private forums. Please help me? |
All times are GMT. The time now is 03:06 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|