<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Featured Site on validate.php (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Featured Site on validate.php
#160
fattymattybrewing (User)
Support Your Local Brewer
Expert Boarder
Posts: 117
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 4 Years ago Karma: 3  
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 (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Featured Site on validate.php 4 Years ago Karma: 9  
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: 117
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 4 Years ago Karma: 3  
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: 117
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 4 Years ago Karma: 3  
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
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

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