PDA

View Full Version : Hack Help...


Chris M
05-28-2002, 06:04 PM
I am creating a Hack for use at a future Board of mine, and possibly for release if it goes well...I was wondering if you could help me/guide me on the following issues :

1.) I am creating some new .php files, to hopefully have a complaint form similar to a thread. I have created some new files, newcomplaint.php, showcomplaint.php and complaintreply.php, but I was wondering how I tie them in with each other, and with forumdisplay.php...

Could you please tell me of a code I need to put into each one and forumdisplay.php to get them to link to each other, and only in a designated forum, with the forumid of "22"

2.) Is there any way to remove the function of Moving a Thread Entirely? I would like to apply this to these files, so that the Forums do not get a bit messed up, should a Moderator/Administrator move the complaint to a different forum - I would not want it to damage my forums.

3.) How would I change the files so that only the Administrators can REPLY to the Complaint, but anybody can view it?

4.) In conjunction with that, I was wondering how you would tie in the forumdisplay template to show the specific parts I wanted it to (i.e. any things I would have to add / change?)

5.) In conjunction with the hack, how would I get the postbit template to display it how I would like? Do I have to create some sort of code which only applies to the forum with the id of "22", or would I have to create an entirely new template?

6.) Finally - I would explore the option of having an admincomplaint.php file, which could mean you can control the complaints from the Admin CP, with either Editing or Removing Options. Would this require changes to the functions.php file, and if so, could you point out some of the things that would need changing?

===My Hack Description===

The hack is basically like a Complaint Form on the actual Forums, that anybody can view, but only the Administrators can reply to. This could come in handy if you have people posting about specific issues, such as Moderator Behaviour and Abuse in No-Flaming Forums.

===Something for Mods & Admins of vb.org to note===

I know that some users have been going around, and posting hacks as their own. I would like to state now, that if any of you sees a hack that is advertising a Complaint or a Request Form, or any mention in the files of my construction of this hack, could you please remove it, as I would release the Hack myself should I want it publicised. I may post in the thread complaining about it being released without my permission, as this has taken me a while to make and research, and taken people like FireFly and nakkid and neo and nicksaunders (all of whom are likely to help in some way with this hack) alot of effort to provide help, and it is not courteous to come and steal the idea for their own. Thanks.

===

Satan

Xenon
05-28-2002, 09:47 PM
i'll try to help you out with a few answers, but not to all questions, because its late today, and i'm bit tired ;)

1) normaly you don't really tie files with each other, but you use templatest which have hyperlinks to the other files, and go to sepcial parts there (see normal vb links with the $action partsearcher ;))

to just allow forum id 22
put a piece of code in the send functions like
if ($forumid!=22) { eval("standarderror(\"".gettemplate("error_standarterror")."\");");
exit;
}
or just make the forumid hardcoded, so noone could even get a chance to change it ;)

2)
to move a thread you have to look into postings.php
in the move section
also add something like this:
if ($thread[forumid]==22) { eval("standarderror(\"".gettemplate("error_standarterror")."\");");
exit;
}

3)
in the part wher the replie starts add:
if ($bbuserinfo[usergroupid]!=6) { eval("standarderror(\"".gettemplate("error_standarterror")."\");");
exit;
}


4)
make a variable $complaintinfo or something like that, and put in your parts depending on the usergroup id

5)if the complaints are saved like normal posts, you can use your postbit, just adding some $variables.
but i think it is better to create own templates

6)no, you don't have to change functions.php. Just make your admincomplaint.php include the global file, and write what you want to have in it ;)

Hope i could help you working on this hack

Chris M
05-29-2002, 07:05 PM
Thanks...

You have answered a few of my questions...

I am not entirely sure what the posbit template will be like at the minute - Showmanship is the last thing on my list at the moment...

I think I am going to need a crash course in advanced php to be able to create variables like $complaintinfo etc...

If I release this hack, I would make the admin function after, but I appreciate the help...

Maybe in a few days, after my spell of GCSE exams, I can talk it over with a couple of people from here, and it can become successful...Who knows...

I just dont know why nobody ever thought of it before...

Maybe its too complex;)

Who Knows - Only time will tell! Thanks for the help again, and if anybody has any more helpful tips that you think will help, please post them!!!:)

Satan

N!ck
05-29-2002, 08:04 PM
nah, this isn't so complex it can't be done. if you could zip it up and post it, i'll take a look and see what i can do

Neo
05-29-2002, 08:11 PM
I was thinking of making something like time to use on my board. A smaller version somewhat. It only uses one files and saves the post to the database for further reading.. and only the main admin can access it unless others are given access.

Chris M
05-29-2002, 08:17 PM
Cool...

Could you give some tips on how to make it?

I have got the general gist of it...

I just need the more complex variables and template (postbit) etc bits...

Satan