Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
Clan Hack Details »»
Clan Hack
Version: 1.00, by The_Cyberdemon The_Cyberdemon is offline
Developer Last Online: Feb 2006 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 04-12-2003 Last Update: Never Installs: 57
Is in Beta Stage  
No support by the author.

This hack was requested HERE

Basically, this hack adds a clan system to your vbulletin. Everything is controlled from the usercp. When a user goes to edit his/her profile, there is an additional "clan password" field. Clan leaders should give out the password to clan members. If the password matches one of an exsisting clan, they are added to that clan. There is more information in the request thread.

HACK STATS:

Templates to add: 5
Templates to edit: 2
Files to upload: 3
Files to edit: 3

This includes an easy to follow install guide and installer. Screenshots are below:

Addition to the administration CP

EDIT/ADD CLAN SCREEN

Admin CP clan list screen

Entering clan password in user cp (ignore the image thing, that's a different hack)

List of clans

List of users in that clan

Postbit Stuff


Enjoy the hack!

If you get any errors, please tell me

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-14-2003, 02:03 AM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NEW OPTIONAL ADDITION!

This changes the link in the postbit (it links to the clan page) to a javascript popup sorta like when you click the number of users that have installed a hack. Here's what to do:

STEP 1:

OPEN *FORUMROOT*/admin/functions.php

FIND:
Code:
// SHOW CLAN START
global $DB_site;
$clanfetch=$DB_site->query("SELECT * FROM clan WHERE clanid='$post[clan]'");
$clan=$DB_site->fetch_array($clanfetch);
if ($post[clan]==0 OR !$post[clan]) {
$showuserclan = "Not in Clan";
} else {
$showuserclan = "Clan:<br><a href=\"showclans.php?s=$session[sessionhash]&what=users&clanid='$post[clan]'\">$clan[title]</a>";
}
      // END SHOW CLAN
REPLACE THE ENTIRE THING WITH:
Code:
      // SHOW CLAN START
global $DB_site;
$clanfetch=$DB_site->query("SELECT * FROM clan WHERE clanid='$post[clan]'");
$clan=$DB_site->fetch_array($clanfetch);
if ($post[clan]==0 OR !$post[clan]) {
$showuserclan = "Not in Clan";
} else {
$showuserclan = "Clan:<br><a href=\"javascript:clanopen($post[clan])\">$clan[title]</a>";
}
      // END SHOW CLAN
STEP 2:

Open *FORUMROOT*/misc.php

FIND:
Code:
?>
ADD RIGHT ABOVE THAT:
Code:
// ############################### start users ###############################
if ($action=="clanusers") {
	$templatesused = "clanusers,clanusersbit";
	include("./global.php");
	
	$clanusers = '';
		
	$users = $DB_site->query("SELECT * FROM user WHERE clan='$clanid'");
$usertotal=$DB_site->query("SELECT COUNT(*) AS total FROM user WHERE clan=$clanid");
while ($clanusers=$DB_site->fetch_array($users)) {
if (($counter++ % 2) != 0) {
				$backcolor="{firstaltcolor}";
				$bgclass="alt1";
			} else {
				$backcolor = "{secondaltcolor}";
				$bgclass="alt2";
			}

eval("\$clanuserlist .= \"".gettemplate("clanusersbit")."\";");
}
while ($totalusers = $DB_site->fetch_array($usertotal)) {
$allusertotal += $totalusers[total];
$allusertotal = number_format($allusertotal);
eval("dooutput(\"".gettemplate("clanusers")."\");");
}
}
FINAL STEP:

ENTER YOUR ADMIN CP, GO INTO THE STYLE YOU WILL HAVE THIS IN, THEN GO TO THE "HEAD INSERT" TEXT FIELD.

FIND:
Code:
.sf {
	FONT-FAMILY: verdana, arial, helvetica, sans-serif;
	FONT-SIZE: 10px;
}

</style>
ADD BELOW:
Code:
<script language="javascript" type="text/javascript">
<!--
function clanopen(clanid) {
	window.open("misc.php?s=$session[sessionhash]&action=clanusers&clanid="+clanid,"_blank","toolbar=no,location=no,menubar=no,scrollbars=yes,width=200,height=275,resizeable=no,status=no")


}
// -->
</script>
Wow, wasn't that easy :banana:

THere's a demo HERE
Click on the clan name (liver)
Reply With Quote
  #23  
Old 04-14-2003, 06:18 AM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey its verry nice and ist good for my Counterstrike Clan, but how can i (in the Postbit) Link for my User to other/or all Clan Groups?

look in the Pic what i mean



thxxx

and greetz subu1 *clickinstall*
Reply With Quote
  #24  
Old 04-14-2003, 09:32 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see you got it fixed Good hack!

- miSt
Reply With Quote
  #25  
Old 04-14-2003, 09:51 AM
Esorcista Esorcista is offline
 
Join Date: Apr 2002
Location: Italy
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it, good hack, but i get a problem:
I have a clan with 2 leaders...
Any idea?
Thanks!
Reply With Quote
  #26  
Old 04-14-2003, 10:11 AM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i have a bug too, if i have a leader with the Name Tobsta[LA] i don't see him, but i see anothen Leader with the Name Cronos[LA]

The one Leadername is ok, the other not, why???
Reply With Quote
  #27  
Old 04-14-2003, 01:12 PM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the name is not entered correctly, it WILL NOT show up. Otherwise, it should not be a problem.

NOTE: THe leadername will not show up if it is not a registered user!

If you'd like, i can tell you how to make it so it doesn't have to be a registered user to be a clan leader.

Quote:
hey its verry nice and ist good for my Counterstrike Clan, but how can i (in the Postbit) Link for my User to other/or all Clan Groups?
You can link to the clan page from anywhere. http://www.*yourdomainname*/*yourforum*/showclans.php

I.E. http://www.blindedstorms.com/forums/showclans.php

Oh, and if you'd like all postbits to link to a certain clan, do this:
--If you installed the optional thing--
Go into the *forumroot*/admin/functions.php file.
Find:
Code:
$showuserclan = "Clan:<br><a href=\"java script:clanopen($post[clan])\">$clan[title]</a>";
And change it to:
Code:
$showuserclan = "Clan:<br><a href=\"java script:clanopen(CLANID)\">CLAN NAME</a>";
NOTE: CLANID should be replaced with (when you enter this) the Clan ID of the clan you want it to link to. Find out by going to the showclans.php page (said above), then click on the name of the clan you want to see. at the top, it will be in a format like this:
Quote:
*domainname*.com/*forumroot*/showclans.php?what=users&clanid=1
See where it says clan id? That's what you want to put in the CLANID spot. In the CLAN NAME spot, put the name of the clan.

IF YOU DO NOT HAVE THE OPTIONAL HACK INSTALLED:
FIND:
Code:
$showuserclan = "Clan:<br><a href=\"showclans.php?s=$session[sessionhash]&what=users&clanid='$post[clan]'\">$clan[title]</a>";
CHANGE IT TO:
Code:
$showuserclan = "Clan:<br><a href=\"showclans.php?s=$session[sessionhash]&what=users&clanid='CLANID'\">CLAN NAME</a>";
Remember to replace the CLANID and CLAN NAME like what was said above

Quote:
I have a clan with 2 leaders...
Well, you (or I) could always make a mod on it, but that would cause a different problem: The user would only be allowed to be the leader of ONE clan.
Reply With Quote
  #28  
Old 04-14-2003, 03:58 PM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh , i see it, sorry that was not the correckly Username, but now it works.

But my another Problem now is, if i have two clangroups and user one have clanid 1 and user two have clanid 2 . How must write the link for the postbit, each user has quasi his own left for his clan in the post office bits.

This is for one clan

$showuserclan = "Clan:<br><a href=\"showclans.php?s=$session[sessionhash]&what=users&clanid='1'\">War NAME</a>";

and the another clangroup??

sorry for my bad english

subu1
Reply With Quote
  #29  
Old 04-14-2003, 04:06 PM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm, the way it is default (the way you installed it), the link in the postbit is to the users clan. If that's what you mean by your question, set it back to the default.
Reply With Quote
  #30  
Old 04-14-2003, 04:43 PM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi i am stupid its work easy, I came in disorder only by the user name.

greetz and thxx for your Hack
Reply With Quote
  #31  
Old 04-14-2003, 04:49 PM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I still do recommend the optional install, it makes it look better... muhahaha.

Oh, and when i finish up with what DigitalDesktops' addition, the final install file will have the option of installing either one, the basic or the multi rank. It'll be pretty cool.

If there is anything you would like to request, let me know, i wan't to make this as cool as possible.

I'm also going to add a "pick from list" of clans instead of password thing as well.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:11 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04842 seconds
  • Memory Usage 2,319KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete