Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2010, 06:55 PM
HIddenPanda's Avatar
HIddenPanda HIddenPanda is offline
I Am... Da Sheep
 
Join Date: Jul 2010
Posts: 52
Gender: Male
Credits: 5,275
HIddenPanda
Default Admins Can View All Active Promo Codes

This mod simply adds a page to view all of the current promo codes.

Step One:

Open Up admin.php

Find this string of code:

...
PHP Code:
$article_content "Here you can add or edit the adoptables that are available to your site's visitors.  Please choose an option below...<br><br>
    <a href='admin.php?set=adopts&do=new'>Add a new adoptable</a><br><br>
    <a href='admin.php?set=adopts&do=addlevel'>Add A New Level to an Adoptable</a><br>
    <a href='admin.php?set=adopts&do=editlevels'>Edit Existing Levels or Images</a><br>
    <a href='admin.php?set=adopts&do=uploadimg'>Upload a new Adoptable Image</a><br>
    <a href='admin.php?set=adopts&do=manageimg'>Manage or Delete Images</a>"

Insert between the </a> and " the following code:
PHP Code:
<br>
<
a href='admin.php?set=adopts&do=viewcodes'>View Current Promo Codes</a
That creates a link in the "Change Adoptables" Page;
Now for the actual working code!

In admin.php now find (Note: This should be around Line 800 ish)
PHP Code:
    $i++;
    }

$article_content $article_content."<p>    
    <input name='page' type='hidden' id='page' value='delimg'>
<input type='submit' name='Submit' value='Submit'>
  </p>
</form>"
;



After that insert the following:
PHP Code:
else if($do == "viewcodes"){
    
    
$article_title "Promo Codes";
    
$article_content "<table width='400' border='1'><tbody><tr><td><b>Type</b></td><td><b>Reward</b></td><td><b>Promo Code</b></td></tr>";
    
$query "SELECT * FROM " $prefix "adoptables WHERE whenisavail='promo'";
    
$result mysql_query($query);
    
$promocodes mysql_fetch_array($result);
    
$num mysql_num_rows($result);
    
$i=1;
    while(
$i <= $num){
    
$article_content $article_content."<tr><td>Adoptable</td><td>".$promocodes['type']."</td><td>".$promocodes['promocode']."</td></tr>";
    
$i++;
    }
    
$article_content $article_content."</tbody></table>";

There ya go! Now if you go into the admin panel and click the Change Adoptables page, it will include a link to view any adoptables that require promo codes to get!
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
Some ideas for hiding Promo Codes Kyttias Tutorials and Tips 13 04-20-2015 01:22 AM
A small question regarding adoption limits and promo codes..c: Pear Feedback and Suggestions 2 06-25-2014 10:06 PM
Promo Codes SilverDragonTears Questions and Supports 2 06-30-2012 01:22 PM
promo codes maximillion Questions and Supports 5 07-05-2011 06:28 PM
View Active Promocodes Plugin HIddenPanda Mys v1.1.x Mods 11 01-25-2011 05:10 PM


All times are GMT -5. The time now is 02:04 PM.

Currently Active Users: 439 (0 members and 439 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