Warning: The author of this contribution does not provide support for it anymore.

Sortables CAPTCHA Plugin

Trouble with Artodia Black theme - Sortables CAPTCHA Plugin

Trouble with Artodia Black theme

by james438 » Sun Oct 19, 2014 4:14 am

I've been looking over the F.A.Q. and support threads, but I have not been able to get this to work with the Artodia Black theme.

Here is a link to my forum:

http://animeviews.com/forums/index.php

I have transferred the JS and html files and reinstalling the Artodia Black theme to be sure I was using the latest version. I also purged all of the cache files: One on the main admin page and three on the styles page.
james438
Registered User
Posts: 13
Joined: Tue Jan 23, 2007 5:32 pm

Re: Trouble with Artodia Black theme

by Derky » Mon Oct 20, 2014 12:38 pm

First of all, you need to use the prosilver template files instead of the subsilver2 ones for the style Artodia Black.

The error is caused because jQuery is included twice. To fix:
Open: styles/art_black/template/scripts_footer.html

Find: <!--[if lt IE 9]> (first line of this file)
Before Add: <!-- IF not $INCLUDEDED_JQUERY_SORTABLES_CAPTCHA -->

Find: <script src="{T_THEME_PATH}/theme.js"></script>
Before Add: <!-- ENDIF --> and indent evertyhing between this if-statement with a tab.

So after these changes, the top of the file should look like this:

Code: Select all

<!-- IF not $INCLUDEDED_JQUERY_SORTABLES_CAPTCHA -->
   <!--[if lt IE 9]>
      <script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery-1.10.2.min.js"></script>
   <![endif]-->
   <!--[if gte IE 9]><!-->
      <script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery-2.0.3.min.js"></script>
   <!--<![endif]-->
<!-- ENDIF -->
<script src="{T_THEME_PATH}/theme.js"></script>


Because the style differs quite a lot from prosilver you also need to apply the following changes to properly align the boxes next to each other and to give the hover a background-color:

Open: ./styles/art_black/template/captcha_sortables.html
(If it's not there yet, copy it from the prosilver template folder)
Find:

Code: Select all

<div class="attachbox sortables_captcha_box" style="clear:none; *width:20em;"><!-- *width:20em; is for nub IE-only -->
Replace with:

Code: Select all

<div class="attachbox sortables_captcha_box" style="float:left; width:20em; margin-left:0;">
You need to search & replace this 2 times.

Find:

Code: Select all

// ]]>
</script>

After Add:

Code: Select all

<style>
.bg3 {
   color: #f04343;
   background-color: #1964b0;
   height: 2em;
}
</style>


To see the changes you made you need to refresh the template. You can do this in the Administration Control Panel > Styles > Templates and click [refresh] after Artodia Black.
User avatar
Derky
Development Team Member
Development Team Member
Posts: 4825
Joined: Sun Apr 10, 2005 9:58 am
Location: Netherlands
Contact:

Re: Trouble with Artodia Black theme

by james438 » Mon Oct 20, 2014 2:03 pm

It works perfectly now, thanks! That was a lot of work on your part just to get a non standard theme to work with your plugin. Thank you!

One tiny question to check my work. After the last change you had me make in ./styles/art_black/template/captcha_sortables.html the code now looks like this:

Code: Select all

// ]]>
</script>
<style>
.bg3 {
   color: #f04343;
   background-color: #1964b0;
   height: 2em;
}
</style>

<!-- IF S_TYPE == 1 -->


I want to be sure I did not add too many new lines although that may not matter.
james438
Registered User
Posts: 13
Joined: Tue Jan 23, 2007 5:32 pm

Re: Trouble with Artodia Black theme

by Derky » Mon Oct 20, 2014 9:24 pm

That's fine. New lines don't matter indeed, the <style>....</style> addition just needs to be after (or at least not between) the <script>...</script> tags.

james438 wrote:It works perfectly now, thanks! That was a lot of work on your part just to get a non standard theme to work with your plugin. Thank you!
You're welcome! ;)
User avatar
Derky
Development Team Member
Development Team Member
Posts: 4825
Joined: Sun Apr 10, 2005 9:58 am
Location: Netherlands
Contact: