vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [RELEASE] Apply to be Mod or Admin. VIA Email. (https://vborg.vbsupport.ru/showthread.php?t=48377)

MetroSports82 04-09-2003 04:10 PM

ok, so you guys want this mod application (by: Logik), to start a "new thread" in a forum of your choice, after a user has submited the application, correct? Here it tis. :)

In mod.php

FIND:
PHP Code:

$subject "$bbuserinfo[username] applying for mod/admin"

ADD BELOW THAT:
PHP Code:

$modforum="110"// type in your forum id number here
    
$DB_site->query("INSERT INTO thread  (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$modforum','1','0','".addslashes($bbuserinfo[username])."','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."','".time()."','$iconid','1','0')");
    
$threadid=$DB_site->insert_id();
    
$DB_site->query("INSERT INTO post  (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','Post Alert - $postinfo[username]','$bbuserinfo[username]','$bbuserinfo[userid]','".time()."','".addslashes(parseurl($email))."','$allowsmilie','$signature','$ipaddress','$iconid','1')");
    
$DB_site->query("UPDATE forum SET replycount=replycount+1,lastpost='".time()."',lastposter='$bbuserinfo[username]' WHERE forumid='$modforum'"); 

Now, just make ( $modforum ="110" ; ) the forum id number of your choice, and your done! I have forum id 110 as one of my private forums to use. :) Anyway, let me know if you have any problems with, and how that comes out. All the credit must be handed out to Logik though, I was not the one that created this hack, so please do not thank me, but him. ! :) Thanks Logik!!! ;)

cheers,
-Metro.

MetroSports82 04-09-2003 05:12 PM

BTW, almost forgot. There is also a quick fix, on to size of the "text box", (where your users would type in why they would like to become a mod), via templates. I have inserted a screenshot to show you what I mean.

Anyway, to accomplish this...

In your "mod" template-

FIND:

Code:

<textarea name="message"></textarea>
REPLACE THAT WITH:
Code:

<textarea rows="17" cols="87" name="message"></textarea>
Or, if you want to use a custom size, just simply play around with the ROWS and COLS #'s, to get the size your looking for. :)

thanks,
Metro.

Funkie 04-09-2003 05:32 PM

getting a prase error on the first line:(

$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastpos

will have a fiddle about with ,thanx for the info

laycomp 04-09-2003 05:46 PM

Had he given the files to Logik as he requested perhaps things could get off to a good start, but doesn't want to do that. I stand as I stated earlier.

MetroSports82 04-09-2003 05:47 PM

Funkie, try sending me your mod.php file, and I'll have a look at it. :)

Funkie 04-09-2003 05:53 PM

will attach it here for you fella
This is the basic mod.php file.I have removed the extra code:)

Thanx for the help

MetroSports82 04-09-2003 05:55 PM

Quote:

Today at 02:46 PM laycomp said this in Post #44
Had he given the files to Logik as he requested perhaps things could get off to a good start, but doesn't want to do that. I stand as I stated earlier.
I agree, I totally take the blame on my part. I should have (like you said) given the file to Logik first, but rather took the wrong approach. But, I'll be honest.. I'm a little new to this hacking stuff. (not the forum), but modifying and stuff like that. Heck, I'm still working on releasing my first ever hack here, which I'm still in the process of working on. :D But, I'm not that kind of person to not give credit, where its due. Seriously. I dunno what other way to tell ya, but my deepest apologies to Logik, and his awesome hack. Wish I could go back and undo what I said 2 days ago. :(

thanks,
Metro.

MetroSports82 04-09-2003 06:12 PM

Funkie, ok try this one.

Now, all you'll need to do is to change the $modforum number to the forum of your choice.

PHP Code:

$modforum="103"

To do that. Simply change the number '103', in this file, to the forum id number you want to use. Let me know how this comes out for ya. Its working for me, on 2.2.9. and should really work for any version before and after this one. :)

thanks,
Metro.

Funkie 04-09-2003 06:20 PM

Sorted fella:)
Many thanx.posts into the right forum just the 1 time now:)

Is there any way this can be modded to work outside of the forums folder.ie root so it can be used then for outsiders to apply to become a member.

Just a thought please dont flame me.lol

Big ups to you all for your work on all the mods/hacks

Thanx

Logik 04-09-2003 11:08 PM

Be more spacific. I havnt made a hack in ages. I might can do this for you.


All times are GMT. The time now is 09:30 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.01028 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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