vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   [AJAX] vBShout v2.0 (https://vborg.vbsupport.ru/showthread.php?t=93097)

DjTaz 05-14-2006 08:59 PM

Well done Sir Yaro - that was a lot more simple that i had expected - but does it work ok ? as in if u type http://www.test.com , what do you get ?

Sir_Yaro 05-14-2006 09:08 PM

you will get exactly this:
link

DjTaz 05-14-2006 09:22 PM

Excellent - thats exactly what you wanted so - congrats

Total666 05-15-2006 02:56 AM

I just get a link but not a working link in the shoutbox .. I attached my vbshout.php .. Total

louis_chypher 05-15-2006 11:46 AM

Quote:

Originally Posted by Davidspl
Admins, supermods and all mods can edit the shouts, is there anyway to make it admins only edit?

https://vborg.vbsupport.ru/showthrea...93097&page=111 <<< Just use the UserGroupID's you want to have access to the edit shouts functions.

Sir_Yaro 05-15-2006 03:38 PM

Quote:

Originally Posted by Total666
I just get a link but not a working link in the shoutbox .. I attached my vbshout.php .. Total

You did only second code modification but you forgot about first one - the most important...
:)
fix it :)

blacklancer 05-15-2006 04:10 PM

Quote:

Originally Posted by louis_chypher
A possible quick solution to limit access to the archive and archive functions by user group :

There is a template called forumhome_vbshout that has as part of its contents a line with the following info: <a href='vbshout.php?{$session['sessionurl_q']}do=archive'>Shoutbox</a>

Perhaps one could possibly change that line so that it reads:

<if condition="can_moderate()">
<a href='vbshout.php?{$session['sessionurl_q']}do=archive'>Shoutbox</a>
<else />
Shoutbox
</if>

While that will not prevent a user from manually typing in the name of the link. It will prevent those without the knowledge of the links parameters from going further.

If one is a bit more interested in digging deeper one could, possibly, open the vbshout.php file and find:

if ($_GET['do'] == 'archive')
{

located around line 356/357

Then one could, possibly, insert below the line with the "{" and above the line "$navbits = array("vbshout.php?" . $vbulletin->session->vars['sessionurl'] . "do=archive" => 'Archive');"

something like:

if (!in_array($bbuserinfo['usergroupid'], array(5,6,7,X1)))
{ print_no_permission();
exit();
}

Where 5=super moderators, 6=admin, 7=moderators, and (optional) X1= what ever other usergroup one wants to include (if one was not to use X1 then do remember to remove the "," as well).

Then it should be highly possible that one would, possibly, be able to highly limit the access to the Shoutbox, a most wonderful product!, archive functions.

Of course one would be on their in doing such things.:surprised:

i did this, but took it a step futher and only allowed 2 user id's access, one of whom was me. however, when i try to access it, it tells me that i dont have access.

RemiAlone 05-15-2006 05:31 PM

I like this! :)

DjTaz 05-15-2006 10:23 PM

Quote:

Originally Posted by blacklancer
i did this, but took it a step futher and only allowed 2 user id's access, one of whom was me. however, when i try to access it, it tells me that i dont have access.


Can we take a peek at the code you used so we can see if theres a bug in that ? Prob the easiest place to start. (and any other info we might need that you can supply like ur userid and error messages )

Spin Doctor 05-16-2006 02:50 AM

Quote:

Originally Posted by CP1
edit template forumhome_vbshout_archive_shout

find:
Code:

                                <if condition="$bbuserinfo[userid] == $Shout[s_by] OR can_moderate()">
                                        <span style='float:right'>
                                                [<a href='#' onclick='return Shout.Edit({$Shout['sid']})'>Edit</a> | <a href='#' onclick='return Shout.Delete({$Shout['sid']})'>Delete</a>]
                                        </span>
                                </if>

Replace with:
Code:

                                <if condition="$bbuserinfo[usergroupid] == 5 OR $bbuserinfo[usergroupid] == 6">
                                        <span style='float:right'>
                                                [<a href='#' onclick='return Shout.Edit({$Shout['sid']})'>Edit</a> | <a href='#' onclick='return Shout.Delete({$Shout['sid']})'>Delete</a>]
                                        </span>
                                </if>

thats for Super Mods and Admins to edit shouts :)

omg, thanks!


All times are GMT. The time now is 07:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03902 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete