vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vB Timeslip Database - for Automotive websites (https://vborg.vbsupport.ru/showthread.php?t=110717)

Sidewindr 03-20-2006 11:14 PM

I have fixed the logic and fields in the javascript in the modifytimeslips template.

The first part of the template should be as follows..

Code:

<if condition="$vboptions[allowtimeslipupload]">
<script language="javascript">
<!--

function validate(theform) {

        if ((theform.ctb_field55.value<=$vboptions[tdsliprequired]) && (theform.ctb_field55.value>0) && (theform.upload.value=="") && (theform.timeslipdateline.value=="") && (theform.ctb_field57.value=="")) {
                alert("An uploaded copy of or a link to your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                return false;
        }
}
//-->
</script>

<else />
<script language="javascript">
<!--
function validate(theform) {
        if ((theform.ctb_field55.value<=$vboptions[tdsliprequired]) && (theform.ctb_field55.value>0) && (theform.ctb_field57.value=="")) {
                alert("A link to your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                return false; }
}
//-->
</script>
</if>

Once all these changes have been made it's pretty well bug free.. although I am not a big fan of client side verification of forms as it is easy to circumvent. :)

Modify the xml package (or I can do it for you) and reupload then I'll upgrade it retaining the credit .. prolly should also have some additional credit ;)

deathemperor 03-20-2006 11:17 PM

Quote:

Originally Posted by Jenkins
looks like it's working for the most part. but I'm getting a weird thing at the top of my timeslip page.

timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:
timeslips_customfields Template:

here's a link to the page. I prolly messed something up on install.

http://www.okgmp.com/forums/member.p...tails&userid=1


this is a weird problem. I can't tell where it comes from. Is any body else having this problem ?

Sidewindr 03-20-2006 11:29 PM

Another change .. the xml installer needs the following changed ..

Code:

        else
        {
                $db->query_write("ALTER TABLE " . TABLE_PREFIX . "customtimeslippic RENAME " . TABLE_PREFIX . "customfile");
                $db->query_write("ALTER TABLE `" . TABLE_PREFIX . "customfile` CHANGE `timeslippicdata` `filedata` MEDIUMTEXT NOT NULL ");
        }

to

Code:

        else if($check['customtimeslippic'])
        {
                $db->query_write("ALTER TABLE " . TABLE_PREFIX . "customtimeslippic RENAME " . TABLE_PREFIX . "customfile");
                $db->query_write("ALTER TABLE `" . TABLE_PREFIX . "customfile` CHANGE `timeslippicdata` `filedata` MEDIUMTEXT NOT NULL ");
        }


Sidewindr 03-20-2006 11:37 PM

I've modified the xml and reinstalled it but the credits do not show on the bottom .. they are in the template .. maybe cached the old ones ?? Any ideas?

tommyxv 03-21-2006 12:12 AM

Some FYI: If you deleted one of the profile fields for whatever reason, you won't be able to uninstall this product. It will give you a database error because the field is no longer there. You have to remove it from the uninstall code to have it uninstall correctly.

I want Fields 50 and 51 to be drop downs, so I have changed the XML.

Seems to work well.

SilentNoise 03-21-2006 12:56 AM

OK, since things seem to be a little everywhere....

- Download the new attached ZIP file from this thread
- Make the changes mentioned in the TXT file from the attached ZIP file
- Alter the code in image.php using the changes listed in the header of this thread
- Make the change in this post to fix the menu link: https://vborg.vbsupport.ru/showpost....0&postcount=39
- Edit the XML file that comes in the ZIP file as well. Make these changes: https://vborg.vbsupport.ru/showpost....8&postcount=63, then upload it as a product from your Admin CP.

EDIT:
- Also while you're in the Admin CP, change the template "modifytimeslips" (it's in "Modify User Option Templates") - follow the instructions here: https://vborg.vbsupport.ru/showpost....7&postcount=61
(thanks for the heads up Sidewindr)


I'm using the patched version of vB3.5.3 and everything is working great after doing these things.

Sidewindr 03-21-2006 01:45 AM

Did you update the javascript in the modifytimeslip template so that the timeslip image/link enforcement works ?? :)

https://vborg.vbsupport.ru/showpost....7&postcount=61

SilentNoise 03-21-2006 02:10 AM

OH, ya I got that done too. Must've missed it when going back and forth looking for links, but I remember it taking a couple of minutes to find the "modifytimeslips" template.

I've added it to the list above, so hopefully everyone should be good to go.

Jenkins 03-21-2006 02:58 AM

Quote:

Originally Posted by deathemperor
this is a weird problem. I can't tell where it comes from. Is any body else having this problem ?

It's almost like that stuff should be hidden. when you highlight the text, it highlights the coorosponding field below

Sidewindr 03-21-2006 03:46 AM

Some more .. I have refined the checking in the modifytimeslip template..

Here's the new code for the javascript at the top ..

Code:

<script language="javascript">
<!--

function validate(theform) {

        if ((theform.ctb_field55.value<=$vboptions[tdsliprequired]) && (theform.ctb_field55.value>0)) {
                if ((theform.upload.value=="") && (theform.timeslipdateline.value=="") && (theform.ctb_field57.value=="")) {
                        alert("An uploaded copy of or a link to your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                        return false;
                } else if ((theform.upload.value=="") && (theform.timeslipdateline.value=="")) {
                        if ((theform.ctb_field57.value.search(/^http\:\/\/[a-zA-Z]...*\.[a-zA-Z]..\.[jJ][pP][gG]$/) == -1) && (theform.ctb_field57.value.search(/^http\:\/\/[a-zA-Z]...*\.[a-zA-Z]..\.[gG][iI][fF]$/) == -1)) {
                                alert("Incorrect Link Supplied for Timeslip Image.");
                                return false;
                        }
                }
        }
}
//-->
</script>

<else />
<script language="javascript">
<!--
function validate(theform) {

        if ((theform.ctb_field55.value<=$vboptions[tdsliprequired]) && (theform.ctb_field55.value>0)) {
                if (theform.ctb_field57.value=="") {
                        alert("A link to your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                        return false;
                } else if ((theform.ctb_field57.value.search(/^http\:\/\/[a-zA-Z]...*\.[a-zA-Z]..\.[jJ][pP][gG]$/) == -1) && (theform.ctb_field57.value.search(/^http\:\/\/[a-zA-Z]...*\.[a-zA-Z]..\.[gG][iI][fF]$/) == -1)) {
                        alert("Incorrect Link Supplied for Timeslip Image.");
                        return false;
                }
        }
}
//-->
</script>

This will ensure that if there are no timeslip uploads are allowed then the url for the slip image is something that resembles a url to an image.

If timeslip uploads are allowed it will accept wither an uploaded image or a valid url to an image. :D

If anyone wants the fixed xml installer PM me :D or I can attach it here if ok with deathemperor or I can send it to him :D


All times are GMT. The time now is 04:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02269 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete