Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2011, 10:51 AM
Plague Plague is offline
Member
 
Join Date: Nov 2010
Posts: 50
Gender: Unknown/Other
Credits: 3,074
Plague is an unknown quantity at this point
Default Trouble Ticket Mod

This is just something I was tinkering with and thought might be useful to some here, especially those who struggle with the code or find mods difficult to install. This is a modification of the pre-existing message system to create a trouble ticket system for your site. No new tables are needed.

First off create a link somewhere on your site (where you want users to be able to click to make a ticket). It's best to create it somewhere that is only accessible to logged on/registered users. If they aren't registered why would they need to send you a trouble ticket...

The link should look like this: <b><a href='ticket.php'>Trouble Ticket</b></a>

You'll now need to create a new PHP file named ticket.php
Copy and paste the code below into this file, save, and upload it.
Code:
<?php

include("inc/bbcode.php");
include("inc/functions.php");
include("lang/lang.php");

$ugroup = getgroup();
$canpm = cando($ugroup, "canpm");

if($isloggedin == "yes" and $canpm == "yes"){

$act = $_GET["act"];
$act = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $act);
$act = secure($act);

$user = $_GET["user"];
$user = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $user);
$user = secure($user);

$id = $_GET["id"];
$id = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $id);
$id = secure($id);

$mid = $_GET["mid"];
$mid = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $mid);
$mid = secure($mid);

if($act == "" or $act == "list"){


$article_title = $lang_ticket_title;
$article_content = $lang_ticket_content."<br><form name='form1' method='post' action='pmpost.php'>
  <p><b>Admin:</b><br> 
<input type='radio' name='pmto' id='pmto' value='insert username here'>insert username here
</p>
  <p><b>Issue:</b><br> 
<input type='radio' name='mtitle' id='mtitle' value='TT: General Account Issues'>TT: General Account Issues<br>
<input type='radio' name='mtitle' id='mtitle' value='TT: Log In'>TT: Log In Issues<br>
<input type='radio' name='mtitle' id='mtitle' value='TT: Harrassment'>TT: Harrassment
</p>  
  <p><b>Message Text:</b><br>
  
   <br><textarea name='mtext' cols='45' id='mtext'></textarea> </p>
  <p><input name='outbox' type='checkbox' id='outbox' value='yes'>
</strong>Save A Copy Of This Trouble Ticket</p>
</p>
  <p>
    <input type='submit' name='Submit' value='Submit'>
</p>
</form>"; 

}

else{

$article_title = $lang_invalidact_title;
$article_content = $lang_invalidact;

}
}


else{

$article_title = $lang_title_pmdenied;
$article_content = $lang_pmdenied;

}


echo showpage($article_title, $article_content, $date);

?>
Remember to modify this...

Code:
<p><b>Admin:</b><br> 
<input type='radio' name='pmto' id='pmto' value='insert username here'>insert username here
</p>
  <p><b>Issue:</b><br> 
<input type='radio' name='mtitle' id='mtitle' value='TT: General Account Issues'>TT: General Account Issues<br>
<input type='radio' name='mtitle' id='mtitle' value='TT: Log In'>TT: Log In Issues<br>
<input type='radio' name='mtitle' id='mtitle' value='TT: Harrassment'>TT: Harrassment
</p>
...or this won't work. If you want to add more admin for the user to select from simply copy and paste that section of the code and input the user name accordingly. Same goes for the issue section.


Don't forget to include the new language tags for this page in your lang.php file.
They should appear like the following. Obviously modify the language to suit your needs.

Code:
$lang_ticket_title = "<center>Trouble Ticket</center>";

$lang_ticket_content = "<p>This page allows you to send a trouble ticket .</p>";
I take no credit for this whatsoever. This is simply a quickie edit of pre-existing code. I hope maybe some other users might be able to get some use out of this. I figured it was sort of a cool, quick and easy way for people who aren't knowledgeable of PHP to easily add a ticket system to their site.

Last edited by Plague; 03-28-2011 at 05:19 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
XAMPP trouble Kesstryl Questions and Supports 3 02-13-2013 07:24 AM
For those of you who have trouble with ACP Hall of Famer Questions and Supports 0 02-02-2013 03:29 PM
Admin CP Trouble pachoofoosh Questions and Supports 10 01-24-2013 06:56 PM
More trouble :( Gashu Questions and Supports 6 11-12-2011 11:37 PM
Trouble with /adm Knight Questions and Supports 11 02-15-2009 08:24 PM


All times are GMT -5. The time now is 10:27 AM.

Currently Active Users: 667 (0 members and 667 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636