php forum
php mysql forum
php mysql smarty
 
Topic Options
#238092 - 02/25/03 11:13 AM Need a few hacks for 6.2
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Not sure if this is the right place, but here goes: In order to try and get a handle on bandwidth as well as convert users to Members I need a few hacks like this:<br /><br />1. Currently I would like to see a hack that would allow the image tag to be used by group, not the current, on or off for everyone. This would allow only my Member group to show pics in their posts not everyone.<br /><br />2. I would also like to see a hack that would only allow a certain group to display avitars, not the current, on or off for everyone. This would allow only my Member group to have an avitar in their posts not everyone.<br /><br />Basicly, anywhere I can limit pics/bandwidth by group I'm all for, can anyone create hacks like this, I'm sure others could use these?

Top
#238093 - 02/26/03 10:53 AM Re: Need a few hacks for 6.2 [Re: bisbell]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Anyone? <img src="/forum/images/graemlins/cry.gif" alt="" />

Top
#238094 - 02/26/03 11:38 AM Re: Need a few hacks for 6.2 [Re: bisbell]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
1. This is an easy fix. Find the following lines in ubbt.inc.php:<br />
Code:
<br />    // ----------------------------<br />    // Convert email markup -&gt; html<br />       $Body = preg_replace("/\[{$ubbt_lang['TEXT_EMAIL']}\]([^\[]*)\[\/{$ubbt_lang['TEXT_EMAIL']}\]/i","&lt;a href=\"mailto:\\1\"&gt;\\1&lt;/a&gt;",$Body);<br /><br />    // ---------------------<br />    // Convert image markup <br />       if ($config['allowimages']) {<br />
<br />And replace them with this:<br />
Code:
<br />    // ----------------------------<br />    // Convert email markup -&gt; html<br />       $Body = preg_replace("/\[{$ubbt_lang['TEXT_EMAIL']}\]([^\[]*)\[\/{$ubbt_lang['TEXT_EMAIL']}\]/i","&lt;a href=\"mailto:\\1\"&gt;\\1&lt;/a&gt;",$Body);<br /><br />    // ---------------------<br />    // Convert image markup <br />       Global $user;<br />       if ($config['allowimages'] &amp;&amp; stristr($user['U_Groups'], "-{$config['imagegroup']}-")) {<br />
<br /><br />Then add this line to your config file (and change 5 to the number of the group you want to allow images for):<br />$config['imagegroup'] = "5";<br /><br />2. This is almost as easy. Open up your editbasic.php file and do the following:<br /><br />Find these lines:<br />
Code:
<br />// -----------------<br />// Get the user info<br />   $userob = new user;<br />   $user = $userob -&gt; authenticate();                         <br />
<br /><br />Replace them with this:<br />
Code:
<br />// -----------------<br />// Get the user info<br />   $userob = new user;<br />   $user = $userob -&gt; authenticate("U_Groups");                         <br />
<br /><br />Now find these lines:<br />
Code:
<br />   if ($theme['PictureView']) {<br />      if ( ($config['avatars']) &amp;&amp; (ini_get('file_uploads')) ){<br />
<br /><br />And replace them with this:<br />
Code:
<br />   if ($theme['PictureView'] &amp;&amp; stristr($user['U_Groups'], "-{$config['avatargroup']}-")) {<br />      if ( ($config['avatars']) &amp;&amp; (ini_get('file_uploads')) ){<br />
<br /><br />That's it. Now you need to add a new configuration option to your config file, so open that up and insert this at the end:<br />$config['avatargroup'] = "5";<br /><br />
_________________________
/Gardener | Complete list of my mods

Top
#238095 - 02/26/03 03:21 PM Re: Need a few hacks for 6.2 [Re: c0bra]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
<img src="/forum/images/graemlins/bow.gif" alt="" /> <img src="/forum/images/graemlins/bow.gif" alt="" /> <img src="/forum/images/graemlins/bow.gif" alt="" /> <img src="/forum/images/graemlins/bow.gif" alt="" /> <img src="/forum/images/graemlins/bow.gif" alt="" /><br />I will get this going this weekend and let you know how it went, you da man. <img src="/forum/images/graemlins/grin.gif" alt="" />

Top
#238096 - 06/22/03 07:23 PM Re: Need a few hacks for 6.2 [Re: bisbell]
Deejay_dup1 Offline
Journeyman

Registered: 08/25/02
Posts: 106
Wondering how you can do this for many groups? How would you add in multiple groups, so that more than the one group can add an avatar?<br /><br />Deej<br />

Top
#238097 - 06/22/03 07:29 PM Re: Need a few hacks for 6.2 [Re: darenu]
Deejay_dup1 Offline
Journeyman

Registered: 08/25/02
Posts: 106
This can be done easily it looks like, by adding the groups to this variable?<br /><br />$config['avatargroup'] = "5";<br /><br />How would I add groups 6,7,8 etc?<br /><br />Deejay<br />

Top
#238098 - 06/22/03 08:02 PM Re: Need a few hacks for 6.2 [Re: darenu]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Wouldn't it be easier to just create a special avatar group for this purpose and add all relevant users to it?<br /><br />But I'll see what I can whip up.
_________________________
/Gardener | Complete list of my mods

Top
#238099 - 06/22/03 08:12 PM Using avatars for several groups [Re: darenu]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
Here are complete instructions for letting several groups use avatars. All steps are the same as before except the last one. I've also changed the name of the config option to make it plural.<br /><br />Open up your editbasic.php file and do the following:<br /><br />Find these lines:<br />
Code:
<br />// -----------------<br />// Get the user info<br />   $userob = new user;<br />   $user = $userob -&gt; authenticate();                         <br />
<br /><br />Replace them with this:<br />
Code:
<br />// -----------------<br />// Get the user info<br />   $userob = new user;<br />   $user = $userob -&gt; authenticate("U_Groups");                         <br />
<br /><br />Now find these lines:<br />
Code:
<br />   if ($theme['PictureView']) {<br />      if ( ($config['avatars']) &amp;&amp; (ini_get('file_uploads')) ){<br />
<br /><br />And replace them with this:<br />
Code:
<br />   $grpfound = false;<br />   $avgroups = split(",", $config['avatargroups']); <br />   foreach ( $avgroups as $grp ) {<br />      if ( stristr($user['U_Groups'], "-{$grp}-") ) {<br />         $grpfound = true;<br />      }<br />   }<br />   if ($theme['PictureView'] &amp;&amp; $grpfound ) {<br />      if ( ($config['avatars']) &amp;&amp; (ini_get('file_uploads')) ){<br />
<br /><br />That's it. Now you need to add a new configuration option to your config file, so open that up and insert this at the end:<br />$config['avatargroups'] = "5,6,7"; <br /><br />This has been tested to work on 6.2.3.
_________________________
/Gardener | Complete list of my mods

Top
#238100 - 06/22/03 09:28 PM Re: Using avatars for several groups [Re: c0bra]
Deejay_dup1 Offline
Journeyman

Registered: 08/25/02
Posts: 106
Thanks <img src="/forum/images/graemlins/smile.gif" alt="" /> Since i already had the hack installed before all i had to change was the last snip of code and then the avatargroups 5,6,7 etc...<br /><br />Awesome! thanks!<br /><br />(I cant say enough about the awesome help here.. thanks guys!)<br /><br />Deej<br />

Top
#238101 - 06/22/03 11:04 PM Re: Using avatars for several groups [Re: darenu]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1966
Loc: Sweden, Stockholm
You're welcome. I'm stuck with a problem of my own at the moment and needed some distractions so I might be able to look at the problem with a fresh mind...
_________________________
/Gardener | Complete list of my mods

Top
#238102 - 12/27/03 03:30 PM Re: Using avatars for several groups [Re: c0bra]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
Anybody update this for 6.4?

Top
#238103 - 12/28/03 01:12 PM Re: Using avatars for several groups [Re: Kelly]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Nearest I can tell from comparing the instructions to the code involved in 6.4 it is the same. You should be able to apply the changes from Gardener's text.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#238104 - 12/28/03 01:45 PM Re: Using avatars for several groups [Re: Kelly]
ericgtr Offline
Junior Member

Registered: 05/12/03
Posts: 1109
Okay, I have this working in 6.4 but the problem is with this line, by default in 6.4 it reads<br />
Code:
    <br />$userob = new user;<br />$user = $userob -&gt; authenticate("U_CoppaUser"); 
<br /><br />The only way I can get it to work is to replace "U_CoppaUser" with "U_Groups" I tried this<br />
Code:
    <br />$userob = new user;<br />$user = $userob -&gt; authenticate("U_CoppaUser","U_Groups"); 
<br /><br />and it didn't work.

Top
#238105 - 12/28/03 03:12 PM Re: Using avatars for several groups [Re: BlarC]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
That is because it is suppose to be this <br /><br />$userob = new user;<br />$user = $userob -> authenticate("U_CoppaUser, U_Groups"); <br /><br />not this you have<br /><br />$userob = new user;<br />$user = $userob -> authenticate("U_CoppaUser","U_Groups");
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#238106 - 12/28/03 03:18 PM Re: Using avatars for several groups [Re: sf49rminer]
ericgtr Offline
Junior Member

Registered: 05/12/03
Posts: 1109
Ahh.. thanks <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#238107 - 12/28/03 03:28 PM Re: Using avatars for several groups [Re: BlarC]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Don't meantion it <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#238108 - 12/28/03 03:40 PM Re: Using avatars for several groups [Re: sf49rminer]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
I don't think you need to add U_Groups for 6.4 as it is authenticated within ubbt.inc.php
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#238109 - 12/28/03 03:42 PM Re: Using avatars for several groups [Re: Gorlum]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
U_Groups was authenticated in ubbt-inc.php I beleive in 6.2 as well Ian. no worries though using it here.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#238110 - 03/24/05 01:41 PM Re: Using avatars for several groups [Re: sf49rminer]
isak Offline
Lurker

Registered: 03/24/05
Posts: 1
Has anybody got this to work for 6.5?

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks