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 !

Postby Florky on Thu 18. Dec, 2003 16:48

Hi
In case of the extra permission has already been installed ? is it safe to remove it ? I ask before I also use the Pitrihik mod category hierarchy and I 'm fed up to see these 3 forum in my categories (index, memberlist and shoutbox)
Thanks in advance
Florky
Poster
Poster
 
Posts: 35
Joined: Mon 15. Sep, 2003 22:39

ugh...

Postby dss on Sun 21. Dec, 2003 12:05

I just very carefully did an install for shoutbox without extra permissions (cause i made the mistake of installing Q Box and it won't uninstall without taking the entire nav system of the overall_header.tpl along with it) and i edited the install script, then loaded the mod using easymod.

now i get a pretty shoutbox frame on the index, but no shoutbox, it's blank. no data entry options, no button to go or refresh.

also, typing myurl/myphpbbdir/shoutbox_view.php and shoutbox.php produce blank pages as well.

i am going to go through the code by hand now, but i can't figure out what went wrong.

unless it's this instruction:
open the 3 included php files
shoutbox.php
shoutbox_max.php
shoutbox_view.php

FIND


Code:

//
// 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:

//
// 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.


I understood this code to mean that if i upped it as is, then unregistered users would not be able to see the shoutbox (not true) and only logged in members would be able to see the box and post in it (also not true)

how would i set the above code to operate this way?

guests: no see, no post
all others: see and post

please help.

sad... feeling bad, this is a fresh install of a totally botched previous attempt. looks like i've demolished it again already...

link to my board

dss
dss
Poster
Poster
 
Posts: 17
Joined: Wed 10. Dec, 2003 23:43

Postby vossen on Mon 05. Jan, 2004 19:53

i installed today the mod > without extra permission.
works smart ! thanks.
my only question is
//
// 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
//


this code > lets evrybody see and post and even registerd user can censore.

//
// 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'] = 0;
$is_auth['auth_post'] = 1;
}
}

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

//
// End auth check
//


this code removes the censord and delete button, but even for the admin it is removed.
how i need to change the code > that only the admin can delete/censore.
regards
vossen
vossen
Poster
Poster
 
Posts: 22
Joined: Sat 27. Sep, 2003 08:00

Please help

Postby baruch777 on Wed 07. Jan, 2004 05:03

Please help.
I install this mod.
Read this topic but on shootbox see nothing.


http://dushanbe.no-ip.info/dushanbe/forum/index.php
My forum with Category structure.
Thanks.

baruch777@front.ru
baruch777
Poster
Poster
 
Posts: 1
Joined: Sun 04. Jan, 2004 20:17

Postby lwclam on Sat 17. Jan, 2004 03:00

vossen wrote:this code removes the censord and delete button, but even for the admin it is removed.
how i need to change the code > that only the admin can delete/censore.
regards
vossen


You can try to add the following code in RED. user_level = 2 mean ADMIN level, user_level = 1 mean MOD level. Therefore, if you want all MOD and ADMIN level user can delete the message, you can change it to $userdata['user_level'] > 0.

if ($userdata['user_id']==ANONYMOUS)
{
$is_auth['auth_delete'] = 0;
$is_auth['auth_post'] = 1;
} else if ($userdata['user_level'] = 2)
{
$is_auth['auth_delete'] = 1;
$is_auth['auth_post'] = 1;

} else
{
$is_auth['auth_delete'] = 0;
$is_auth['auth_post'] = 1;
}


Hope it can help you. :D
lwclam
Poster
Poster
 
Posts: 1
Joined: Tue 09. Dec, 2003 06:52
Location: Hong Kong

Postby Niels on Sat 17. Jan, 2004 18:21

if you need only ADMIN / MODS to ba able to cencor posts

then try this

Code: Select all
//
// Start auth check
//
switch ($userdata['user_level'])
{
case ADMIN : //ADMIN and MODS will have any permission below
case MOD : $is_auth['auth_mod'] = 1;
$is_auth['auth_delete'] = 1;

default: //this is the permissions reg and guest users will have
$is_auth['auth_read'] = 1;
$is_auth['auth_view'] = 1;
$is_auth['auth_post'] = 1;
}

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

//
// End auth check
//
(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

Re: shoutbox witout the extra permission mod

Postby chockmilk on Sat 24. Jan, 2004 11:34

Hi i have installed this mod without extra permission but it didnt show anything on the forum index. Ofcourse i did what u have said exactly. My forum has got QBar mod installed, is that the cos of the problem ??? I
that many had answered this but i go thru forum and tried all the
suggestion but still no work out. Anyway the direct links are all work perfect.

:cry: Please help...

http://forum.numjalern.com
http://forum.numjalern.com/shoutbox.php
http://forum.numjalern.com/shoutbox_max.php
chockmilk
Poster
Poster
 
Posts: 2
Joined: Fri 23. Jan, 2004 22:29

Postby Niels on Mon 26. Jan, 2004 14:57

you need proberbly to incude the code into index_body.tpl....

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 !!
(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

PreviousNext

Return to Fully integrated shoutbox [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron