vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Clan Hack (https://vborg.vbsupport.ru/showthread.php?t=51549)

The_Cyberdemon 04-14-2003 02:03 AM

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)

subu1 04-14-2003 06:18 AM

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

http://www.blindedstorms.com/allclansscreen.jpg

thxxx;)

and greetz subu1 *clickinstall*

Dean C 04-14-2003 09:32 AM

I see you got it fixed ;) Good hack!

- miSt

Esorcista 04-14-2003 09:51 AM

I installed it, good hack, but i get a problem:
I have a clan with 2 leaders...
Any idea?
Thanks!

subu1 04-14-2003 10:11 AM

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???

The_Cyberdemon 04-14-2003 01:12 PM

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.

subu1 04-14-2003 03:58 PM

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;)

The_Cyberdemon 04-14-2003 04:06 PM

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.

subu1 04-14-2003 04:43 PM

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

greetz and thxx for your Hack;)

The_Cyberdemon 04-14-2003 04:49 PM

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.


All times are GMT. The time now is 08:17 AM.

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.02466 seconds
  • Memory Usage 1,754KB
  • 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
  • (10)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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