|
How to add a custom location to Who's Online List? - Comprehensive Tutorial
|
|
10-26-2008, 02:57 AM
Post: #11
|
|||
|
|||
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
(10-23-2008 05:02 AM)EviLito Wrote: Hey, hi! Are you exactly in "site.com/forum/custom_directory/index.php"? With ".php" in your browser's address? or in "site.com/forum/custom_directory/"? Your location should contain '.php' Can you give the url, and upload or copy your edited file? Creativity is a drug I cannot live without. |
|||
|
10-26-2008, 04:44 PM
Post: #12
|
|||
|
|||
|
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
Sure, thanks for replying.
"site.com/forum/custom_directory/index.php" means my custom page. The forum original index page is in "site.com/forum/index.php" but it seems like the WOL functions doesn't detect directories? In the "switch-case" code they only select the file name, and my file name is also "index.php" (it's in another directory tough) and it appears in the Who's Online list: "Viewing board index" (or something like that) |
|||
|
10-28-2008, 11:59 AM
Post: #13
|
|||
|
|||
|
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
The WOL functions shouldn't detect directories.
Why not giving it other name? you can still redirect that 'index.php' to the new one if you want Creativity is a drug I cannot live without. |
|||
|
10-28-2008, 03:01 PM
Post: #14
|
|||
|
|||
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
(10-28-2008 11:59 AM)dvb Wrote: Why not giving it other name? Well, I wanted to have a gallery image section, and it's really hard and ugly setting in the forum root directory. It should have its own directory: Example: myforum.com/gallery so in that address yo go to index.php by default, and shows the gallery. Anyway, I guess I should rename it but I won't have a nice address anymore (Ej: myforum.com/gallery/images.php)Thanks for your replies. |
|||
|
01-29-2009, 11:49 PM
Post: #15
|
|||
|
|||
|
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
This is very useful. Thanks for a great tutorial
Need web hosting? Try MyBBWebHost! #1 for Running MyBB Communities The world's only premium web host dedicated to MyBB forums. |
|||
|
02-01-2009, 03:34 PM
Post: #16
|
|||
|
|||
|
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
I've just viewed this thread How do I hide a group from "who's online"?, so I'm giving the answer here to help all the others.
First of all we have to know in which pages MyBB generate a viewable list of users (except plugins), a quick search of 'while($user = $db->fetch_array($query))' will give a quick result (I've omitted the unimportant results): MYBB_ROOT/forumdisplay.php Line 214 listing the users that browsing the same forum MYBB_ROOT/inc/functions_calendar.php Line 523 listing the users that have a birthday today or in a calendar day MYBB_ROOT/index.php Line 69 listing usernams of all online users MYBB_ROOT/memberlist.php Line 215 members list... MYBB_ROOT/online.php Line 166 the who's online list MYBB_ROOT/portal.php Line 256 generally, like index.php To control which user groups are shown just add in the top of the mentioned loop ('while($user = $db->fetch_array($query))') of any of the pages above, a code like the following examples, that will check the user's usergroup and according to the condition skip the user: For example, in 'online.php' we have this code: PHP Code: while($user = $db->fetch_array($query))PHP Code: while($user = $db->fetch_array($query))Another example, in 'memberlist.php' we have this code: PHP Code: while($user = $db->fetch_array($query))PHP Code: while($user = $db->fetch_array($query))Both of the examples above can be made in a plugin in the proper hook. Creativity is a drug I cannot live without. |
|||
|
02-01-2009, 04:05 PM
Post: #17
|
|||
|
|||
|
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
In this thread - http://community.mybboard.net/thread-44052.html
you can see a nice & simple solution for the following problem: (01-24-2009 09:35 PM)Sephiroth Wrote: A while back I posted a question regarding online list integration, for a custom-coded section of the website.And the solution (01-28-2009 12:23 PM)flash.tato Wrote: Did you study at least the function expecially the $location param.I should note that in case this doesn't working, try something like "/forums/index.php?" In my localhost I've installed mybb in the subfolder 'mybb' and for the location 'http://127.0.0.1/mybb/online.php' the $location param' is '/mybb/online.php?' Creativity is a drug I cannot live without. |
|||
|
02-02-2009, 07:34 PM
Post: #18
|
|||
|
|||
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
(02-01-2009 04:05 PM)dvb Wrote: In this thread - http://community.mybboard.net/thread-44052.html Well my solution is pretty raw i've to say. Because it doesn't check proper URL (that code with index.php?id=ok will fail because it isn't handled properly) but hey it was meant as proof of concept. ![]() And good work for a guide also if i highly suggest users to learn PHP or better programming
|
|||
|
02-03-2009, 08:33 AM
Post: #19
|
|||
|
|||
|
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
this was very usefull to me, thanks dvb
[]s, Claudio Tutorial: Jquery (by google API) with mybb (Prototype) Distinction between Paid/Free Plugins Threads |
|||
|
02-04-2009, 05:46 PM
Post: #20
|
|||
|
|||
RE: How to add a custom location to Who's Online List? - Comprehensive Tutorial
(02-02-2009 07:34 PM)flash.tato Wrote: Well my solution is pretty raw i've to say.maybe an strpos? or parse_str? (02-03-2009 08:33 AM)aglioeolio Wrote: this was very usefull to me, thanks dvbno problem
Creativity is a drug I cannot live without. |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help





(Ej: myforum.com/gallery/images.php)

