WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

How to Validate Custom Attach Fields?

Version: 4.0 RC1
printPrint


How to Validate Custom Attach Fields?
joshberm
Nothing is impossible...
Avatar

Usergroup: Customer
Joined: Aug 07, 2006
Location: Tampa, Florida
Total Topics: 36
Total Posts: 91
Posted 09/25/06 - 01:50 PM:
quote post
#1
Is there a way to validate my custom attachment fields individually when somebody edits their link? Requiring validation of attachments doesn't seem to affect the custom fields.

I'd like to show thumbnails and choose to accept or reject each one.


Edited by joshberm on 09/25/06 - 01:54 PM
joshberm
Nothing is impossible...
Avatar

Usergroup: Customer
Joined: Aug 07, 2006
Location: Tampa, Florida
Total Topics: 36
Total Posts: 91
Posted 09/27/06 - 11:57 AM:
quote post
#2
I'm getting some weird stuff in my Validation page... thought that it might have to do with custom attachments but seems to be a problem with something else.

For members, I switched ON validation of Link Edits (this is where they upload their custom attachments photos). Submission process is OK. But Validation is problematic.

After I select the edited link and click Approve, multiple weird items show up on my Validation page when it reloads. See the attachment please.



I have experimented a bit and have found this problem with the HTML output in the Validation page.....

On the initial Validation page:
<span class="labels">Category:</span><a href="http://www.webmastersite.net/forums/../index.php?action=displaycat&amp;catid=16"></a><br>

no cat name!


On the reloaded Validation page:
<span class="labels">Category:</span><a href="http://www.webmastersite.net/forums/../index.php?action=displaycat&amp;catid=<span class="searchhighlight"></span>"></a><br>

no catid!




It seems that the {LINKCATNAME} is not carrying over into the Validation page. I have modified my Edit Link template significantly, and I intentionally limited the categories my users can place links into. I used a toplist to create a drop-down selector of all the Top Level cats.

Here's the relevant code from the Edit Link template:
<tr>
<td class="labelscolumn"><span class="labels">Category:</span></td>
<td class="optionscolumn">
<IF 1>
<select name="catid">
<!-- BEGIN TOPLIST 11 -->
<CONFIG>categories,name,99,ascending,parent=0,,,0,0,0,0</CONFIG>
<IF {LINKCATID} is {CATID}>
<option value="{CATID}" selected>
<ELSE><option value="{CATID}">
</IF>{CATNAME}</option>
<!-- END TOPLIST 11 -->
</select>
<ELSE>Category #<input type="text" name="catid" size="3" value="{LINKCATID}"></IF> Currently {LINKCATNAME}</td>
</tr>


My Validate Items template is out of the box 4.0 RC1

My Edit Link template is customized from 3.4.3 (but as I can tell nothing significant has changed in 4.0 on this template)

Please help!



Edited by joshberm on 09/27/06 - 11:59 AM

Attached Files:
Untitled-2.jpg
(181 KB, 22 downloads)
attachment
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 09/29/06 - 03:50 PM:
quote post
#3
Custom file fields can't be validated.

The edit link page has nothing to do with the validation page.

As for 3.4.3 vs. 4.0.0 you can see that lots of stuff changed in the template, with your own file comparison tool like kompare or with the nline one at http://www.wsnforum.com/filecomparison . Don't know if the changes are relevant or not to your situation.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.