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
  #32  
Old 04-14-2003, 06:40 PM
The_Cyberdemon The_Cyberdemon is offline
 
Join Date: Mar 2003
Location: VA
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, here's what i plan to add in the final hack:[list=1][*]Multiple Clan Memberships[*]Pick Clan From List[*]Get admitted to a clan only on approval of leader (request with a special type of pm)[*]Clan Leader CP[*]Clan Level System (Clan Leader CP addon)[/list=1]
Anything else i should do?
Reply With Quote
  #33  
Old 04-14-2003, 06:46 PM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thats all sounds good to me.

maybe for an addon: if u get out of a clan u lose money?

also i tried the addon and it doesn;t work. i get this as a link
http://www.rpgadvance.com/forum/java%20script:clanopen(1)

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

OOps, stupid mistake on my end.
It's
Code:
javascript:clanopen($post[clan])
Not
Code:
java script:clanopen($post[clan])
I accidentaly put a space in it. my mistake. sorry.

Edit: I actually posted it correctly, but something about the "[code]" tag make javascript become java script.here's what it should read:
Quote:
javascript:clanopen($post[clan])
Edit 2: It did the same thign? WTF? Here:
javascript:clanopen($post[clan])

Edit 3: OH MY GOD! it won't work. I'm reporting this. Just no that there is no space in "javascript"
Reply With Quote
  #35  
Old 04-15-2003, 12:04 AM
DigitalDesktops DigitalDesktops is offline
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 03:57 AM The_Cyberdemon said this in Post #21
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="#13486D";
				$bgclass="alt1";
			} else {
				$backcolor = "#1C5780";
				$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)
in misc.php it says:

PHP Code:
    $templatesused "clanusers,clanusersbit"
I don't have those templates.
Reply With Quote
  #36  
Old 04-15-2003, 04:15 AM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 08:34 PM The_Cyberdemon said this in Post #31
Okay, here's what i plan to add in the final hack:
[list=1][*]Multiple Clan Memberships[*]Pick Clan From List[*]Get admitted to a clan only on approval of leader (request with a special type of pm)[*]Clan Leader CP[*]Clan Level System (Clan Leader CP addon)[/list=1]
Anything else i should do?
wowww, thats super addons, i waiting for :-)))))))


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

i'm going on vacation the day after tomorrow, so this may take some time, but they will be released
Reply With Quote
  #38  
Old 04-15-2003, 06:11 PM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 03:53 PM The_Cyberdemon said this in Post #33
OOps, stupid mistake on my end.
It's
Code:
javascript:clanopen($post[clan])
Not
Code:
java script:clanopen($post[clan])
I accidentaly put a space in it. my mistake. sorry.

Edit: I actually posted it correctly, but something about the "[code]" tag make javascript become java script.here's what it should read:


Edit 2: It did the same thign? WTF? Here:
javascript:clanopen($post[clan])

Edit 3: OH MY GOD! it won't work. I'm reporting this. Just no that there is no space in "javascript"
ok i changed it and the link is right but there isn;t ne pop ups or nething when i click on it. i have added the code in misc.php

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

Quote:
ok i changed it and the link is right but there isn;t ne pop ups or nething when i click on it. i have added the code in misc.php
HUGE mistake on my end. HUGE. I forgot to show you what templates to add... lol. That's pretty sad of me. Without the templates, nothing should show up, so here they are:

TEMPLATE 1:
NAME: clanusers
CONTENT:
Code:
<html>
<head>
<title>$bbtitle Clanusers?</title>
$headinclude
<script language="Javascript">self.focus();</script>
</head>
<body>

<table cellpadding="10" cellspacing="0" border="0" bgcolor="{pagebgcolor}" width="100%"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" bgcolor="{tablebordercolor}" width="100%">
<tr>
	<td colspan="2" bgcolor="{categorybackcolor}"><normalfont color="{categoryfontcolor}"><b>Total Users: $allusertotal</b></normalfont></td>
</tr>
<tr>
	<td bgcolor="{tableheadbgcolor}" width="100%"><smallfont color="{tableheadtextcolor}">User</smallfont></td>
	<td bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}">Posts</smallfont></td>
</tr>
$clanuserlist
<tr>
	<td bgcolor="{tableheadbgcolor}" colspan="2" align="center">
	<a href="javascript:self.close();"><smallfont color="{tableheadtextcolor}">[ Close Window ]</smallfont></a>
	</td>
</tr>
</table>
</td></tr></table>

</body>
</html>
TEMPLATE 2:
NAME: clanusersbit
CONTENT:
Code:
<tr>
	<td bgcolor="$backcolor">
	<normalfont>
	<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$clanusers[userid]" target="_blank">$clanusers[username]</a>
	</normalfont></td>
	<td bgcolor="$backcolor"><normalfont>$clanusers[posts]</normalfont></td>
</tr>
It should be fixed if you do that.
Quote:
I would like to request that the creation of a new clan also has the option to create a private clan forum for members only in a preset catergory like "Clan Forums" I would suggest this as an addon as not everyone would need this feature.
Okay, this shouldn't take long.

NOTE: remember to change all of the "java script" things to "javascript". That's pretty annoying, isn't it.
Reply With Quote
  #40  
Old 04-15-2003, 08:30 PM
Jagang Jagang is offline
 
Join Date: Mar 2003
Location: Dallas, Tx
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 06:43 PM The_Cyberdemon said this in Post #30

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.
I would like to request that the creation of a new clan also has the option to create a private clan forum for members only in a preset catergory like "Clan Forums" I would suggest this as an addon as not everyone would need this feature.
Reply With Quote
  #41  
Old 04-15-2003, 08:38 PM
kaotic's Avatar
kaotic kaotic is offline
 
Join Date: Mar 2003
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:24 PM Jagang said this in Post #38
I would like to request that the creation of a new clan also has the option to create a private clan forum for members only in a preset catergory like "Clan Forums" I would suggest this as an addon as not everyone would need this feature.
I was thinking the same thing. This feature would make it even better. I can obviously do this myself, but I think it would be better if the clan leaders could decide to open it/close it and pick the name/description that they want on their own. Also, I already have a forum called "Hosted Organizations" in which I set up a subforum for each clan. I prefer subforums rather than base forums in order to keep the index smaller.
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 09:02 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.09091 seconds
  • Memory Usage 2,328KB
  • 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
  • (12)bbcode_code
  • (1)bbcode_php
  • (8)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