Find programmers and grapic design experts at ScriptLance.com
<? DEW-CODE.COM  
Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Featured Site on validate.php (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Featured Site on validate.php
#160
fattymattybrewing (User)
Support Your Local Brewer
Expert Boarder
Posts: 83
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Fatty Matty Brewing Location: Southwestern Wisconsin Birthdate: 1974-11-05
Featured Site on validate.php 2 Months, 1 Week ago Karma: 2  
One thing I have always wondered how to do is to...


...while validating a newly submitted site have a check mark for making the site a "Featured Site". This is right now only a function on the "admin/edit_site.php" page. Any ideas how to add this to the validate.php code?
 
Report to moderator   Logged Logged  
 
Lifes Too Short To Drink Crappy Beers
fattymattybrewing.com
  The administrator has disabled public write access.
#162
Dewed (User)
Administrator
Posts: 123
graph
User Offline Click here to see the profile of this user
Dew-Code.com
Re:Featured Site on validate.php 2 Months ago Karma: 4  
Warning .. I have not tested this.

Edit /admin/validate.php

Locate line #46 after ..
Code:

$Email=mysql_escape_string($_POST['Email']);
add ...
Code:

$featured=mysql_escape_string($_POST['featured']);
Edit line # 63 change from
Code:

Hint
to ...
Code:

Hint, featured
Edit line # 77 change from
Code:

'$Hint'
to ...
Code:

'$Hint', '$featured'
Down around line 177, locate this block of code
Code:

value="<?=$rows[Email]?>" size="35"></td> </tr> <tr> <td colspan="2" align="center"><input class="button" type="submit" name="validate_site" value=" Validate Site "></td>
Change to
Code:

value="<?=$rows[Email]?>" size="35"></td> </tr> <tr><td class="text">Featured site ?</td><td> NO :<input type=radio name=featured value=0 checked>&nbsp;&nbsp;&nbsp; YES :<input type=radio name=featured value=1> </td></tr> <tr> <td colspan="2" align="center"><input class="button" type="submit" name="validate_site" value=" Validate Site "></td>
Hopefully I didn't miss anything. Let me know
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/05/14 23:43 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#168
fattymattybrewing (User)
Support Your Local Brewer
Expert Boarder
Posts: 83
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Fatty Matty Brewing Location: Southwestern Wisconsin Birthdate: 1974-11-05
Re:Featured Site on validate.php 2 Months ago Karma: 2  
Very cool I will try that out and let you know how it works - or doesn't -haha
 
Report to moderator   Logged Logged  
 
Lifes Too Short To Drink Crappy Beers
fattymattybrewing.com
  The administrator has disabled public write access.
#169
fattymattybrewing (User)
Support Your Local Brewer
Expert Boarder
Posts: 83
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Fatty Matty Brewing Location: Southwestern Wisconsin Birthdate: 1974-11-05
Re:Featured Site on validate.php 2 Months ago Karma: 2  
Dewed wrote:
QUOTE:
Warning .. I have not tested this.
...
Hopefully I didn't miss anything. Let me know


wow that was awesome, it totally works and I was able to verify that it does turn the site on as a featured site while validating a new site! VERY VERY COOL!

This is one to definitely keep bookmarked and easy for a non-programmer like me too!

like I said before the key is to duplicate/backup the file before you affect it with code changes - in case it doesn't fly!
 
Report to moderator   Logged Logged  
 
Lifes Too Short To Drink Crappy Beers
fattymattybrewing.com
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Newsflash

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008