shoutbox witout the extra permission mod

This shoutbox, fully integrates in phpbb2, support smilies and bbcode
this shoutbox is a shoutbox written for phpbb2, therefor it makes uses of templates and language files

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

shoutbox witout the extra permission mod

Postby Niels on Mon 17. Nov, 2003 22:48

EDIT: shoutbox NO LONGER require "extra permission mod" in the pressent version - you may ofcouse use the info in this topic to do the "reverse" if you would like to use the extra permission... :D

Meny users have requested how to make shoutbox without the extra permission MOD, if installing this mod without extra permission MOD you can NOT control permissions per usergroup - ONLY by user type.
and you can't change this from ACP.
the bennefit, is that this code is faster, and will produce less load on your webserver - witch enable you to make the autorefresh faster....

first of all, you should NOT do the changes described in the how-to regarding these files:
includes/page_header.php

open the 3 included php files
shoutbox.php
shoutbox_max.php
shoutbox_view.php

FIND
Code: Select all
//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, PAGE_SHOUTBOX_MAX, $userdata);

if( !$is_auth['auth_read'] )
{
   $message = ( !$is_auth['auth_view'] ) ? $lang['Not_Authorised'] : sprintf ($lang['Sorry_no_auth'],$is_auth['auth_read_type']);
   message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//


REPLACE WITH

Code: Select all
//
// Start auth check
//
switch ($userdata['user_level'])
{
   case ADMIN :
   case MOD :   $is_auth['auth_mod'] = 1;
   default:
         $is_auth['auth_read'] = 1;
         $is_auth['auth_view'] = 1;
         if ($userdata['user_id']==ANONYMOUS)
         {
            $is_auth['auth_delete'] = 0;
            $is_auth['auth_post'] = 1;
         } else
         {
            $is_auth['auth_delete'] = 1;
            $is_auth['auth_post'] = 1;
         }
}

if( !$is_auth['auth_read'] )
{
   message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}

//
// End auth check
//


hard code, witch type of users have access to what, inside this code 1 means enable, while 0 means disabled.

in the file templates/subSilver/index_body.tpl
you should NOT include the code
Code: Select all
<!-- BEGIN switch_shoutbox_on -->
<!-- END switch_shoutbox_on -->

ONLY include the code found in between !!

thats it - no need for extra permission MOD anywhere.
Last edited by Niels on Mon 08. Mar, 2004 14:17, edited 3 times in total.
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Sammyed on Wed 19. Nov, 2003 22:14

Thanks for the hard and nice job Niels.

I´m very interested on this MOD as I´m a complete mule on this.

I tried updated my data base with both:

-extra_p_db_update.php
-shoutbox_db_update.php


Code: Select all
copy extra_p_db_update.php to extra_p_db_update.php
execute extra_p_db_update.php
delete extra_p_db_update.php


Code: Select all
copy shoutbox_db_update.php to shoutbox_db_update.php
execute shoutbox_db_update.php
delete shoutbox_db_update.php


The way I know is using FTP and copying this files at the correct place, and then to go to my browser and write "www.mydomain.com/phpBBroot/and_here_the_files.php". Then a page establishing that "Your database was updated, please delete this file now"...so I go to my FTP, and I delete it.

In my case, the page "is not found". So I have no clue at all how update my database as also I didn´t find on instructions some queries for my SQL like (ALTER, INSERT, CREATE, and sutff), I don´t use EM as I was told that EM doesn´t work with previous mods installed. All of this in order to have your excellent Shoutbox mod in my board with or with out extra premision mod.

Keep it UP.

Thanks for Reading.
Sammyed
Poster
Poster
 
Posts: 33
Joined: Fri 14. Nov, 2003 23:35

Postby Niels on Fri 21. Nov, 2003 00:53

you seam to have tryed doing it correctly.

how-ever somehow you haven't uploaded it to your forum root, or you have miss-typed the name in your browser.

if the file exist, the browser should not display "file not found" please try once more, be shureto type in the letters in capital or lower case as they should - some servers are case senticive
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Sammyed on Fri 21. Nov, 2003 06:00

:lol: :lol:

I just noticed (after hours and hours) that in fact the file .php that I copied for the extra permision mod its name is not "extra_p_db_update.php". I read very carefully inside my FTP and the name that arrived with the download is:

"extra_p_db_udpate.php".


Will I have any problem if I execute with different name?...instructions says "execute .......update.php."


Edited: Anyway I did it and page opened with this:


This list is a result of the SQL queries needed for the additional mods in the pre-moded pack


Extra Permissions
[Added/Updated] line: 1 , ALTER TABLE phpbb_auth_access CHANGE `forum_id` `forum_id` SMALLINT(5) DEFAULT "0" NOT NULL
[Added/Updated] line: 2 , ALTER TABLE phpbb_forums CHANGE `forum_id` `forum_id` SMALLINT(5) DEFAULT "0" NOT NULL
[Added/Updated] line: 3 , ALTER TABLE phpbb_forums CHANGE `cat_id` `cat_id` MEDIUMINT(8) DEFAULT "0"


Specialpages permisions MOD (INDEX PAGE)
[Added/Updated] line: 4 , INSERT IGNORE INTO phpbb_forums (forum_id ,cat_id, forum_name, forum_desc, forum_status ) VALUES ("-99", "0", "INDEX PAGE", "Index Page Control", 1 )


Specialpages permisions MOD (MEMBERLIST)
[Added/Updated] line: 5 , INSERT IGNORE INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status ) VALUES ("-7","0", "MEMBERLIST", "Memberlist Control", 1 )



Seems correct?.




Thanks For Replying.
Sammyed
Poster
Poster
 
Posts: 33
Joined: Fri 14. Nov, 2003 23:35

Postby Niels on Fri 21. Nov, 2003 14:57

:lol: I wasen't aware of this speel error, thanks for reporting this, I will update the ZIP :D
any-way the name of the file isen't importent, as the name is only used when you type it in your browser for "one time" execution, after this you may delete /remove the file

I asume it is now runing at your site as it should
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby gotvenm on Thu 04. Dec, 2003 23:00

I tired installing this without the extra permissions, but it doesnt show up on the index page. The scripts are accessible independently and work fine, but it doesnt show up anywhere.

Ideas?
gotvenm
Poster
Poster
 
Posts: 5
Joined: Fri 09. May, 2003 01:24

Postby Niels on Fri 05. Dec, 2003 01:16

in the file templates/subSilver/index_body.tpl
you should NOT include the code
Kode:
<!-- BEGIN switch_shoutbox_on -->
<!-- END switch_shoutbox_on --> only the code in between
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby gotvenm on Sat 06. Dec, 2003 10:42

Oh, I see. Thanks Niels ! I cimpletely misunderstood what I was to do there. :oops:
gotvenm
Poster
Poster
 
Posts: 5
Joined: Fri 09. May, 2003 01:24

Next

Return to Fully integrated shoutbox [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron