News:

Wondering if this will always be free?  See why free is better.

Main Menu

[WIP/Public beta] Apocalypse theme

Started by Antechinus, June 25, 2014, 02:51:19 AM

Previous topic - Next topic

busterone

Nice. I was about to post that I tried installing this theme on a clean 2.0.9 test site and did not get the illegal string errors. Theeeeen, it started there too.   ;D
Patch applied.   

Chalky

Quote from: Antechinus on January 11, 2015, 04:11:38 PM
Ok, thanks to onepiece I have an answer on the illegal string template errors. Bug fix zip attached. Will also fix the undefined on the Memberlist, and update the Help.template.php and languages folder to use the separate languages file I'm now running (just saves a bit of performance on most pages) as well as giving you the nifty new buddy list.

Just "Extract here" on desktop, then upload the folder into Themes. :)

Will be ready for TK2 soon :D

Yesss that works for the memberlist errors!!  :D

Still getting this one though:

Quotehttp://chalkcat.com/index.php?action=who
8: Undefined index: online
File: /home/chalkcat/public_html/Themes/Apocalypse_TK1/Who.template.php
Line: 72

off to change the css....

Chalky

Quote from: Antechinus on January 11, 2015, 04:21:06 PM
Ok, more tweaks to pagination.css. Just overwrite the lot with this. Should work.

/* Next is to play nicely with default Subs.php output */
.pagelinks span, .pagelinks strong {
margin: 4px 0;
padding: 2px 12px 4px 12px;
float: left;
font-size: 0.857em;
text-transform: capitalize;
white-space: nowrap;
border: 1px solid #000;
border-top: 1px solid #333;
background-image: linear-gradient(to bottom, #292929 0%, #111 80%);
}
.pagelinks span._expanded .navPages, .pagelinks span._expanded strong {
margin: 0;
}
.pagelinks span._expanded {
padding: 0;
}
.pagelinks select {
margin: 4px 0 -4px 0;
}


Oh verrry nice!!! 


Antechinus

Oh bat poo. Forgot about Who.template.php. Ok, will take a look at it. I'm still stumped about this js conflict though. I looked through code for the mentions mod and couldn't see anything obvious, but my js skills aren't that great. Might have to talk to the mod author about it (assuming they can be contacted).

You can add a small left margin to the select too, if you like.

Antechinus

Ok, I think I see what I did with Who.template.php, but will leave testing changes for tonight.

Antechinus

w00t! Got the bastard! That who mod is calling jQuery too. Here's the page source for the in-topic pages. I've snipped most if it. The relevant line is 488 if you grab it from your own browser.


<script type="text/javascript">
var jquery_url = "//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js";
var atwho_url = "http://chalkcat.com/Themes/default/scripts/jquery.atwho.js";
var smf_sessid = "787d868b008335e583bb754a37a2cef8";
var smf_sessvar = "e7f851d41bbe";
</script>
<script type="text/javascript" src="http://chalkcat.com/Themes/default/scripts/mentions.js"></script>
<link rel="stylesheet" type="text/css" href="http://chalkcat.com/Themes/default/css/mentions.css" /><script type="text/javascript" src="http://chalkcat.com/Themes/default/scripts/postbitmenu.js"></script><div id="postbitmenu_71217" class="postbitmenu"><div class="catbg">Michael</div><div class="pbm_item windowbg"><a href="http://chalkcat.com/index.php?action=profile;u=25" rel="nofollow">View Michael's profile</a></div><div class="pbm_item windowbg"><a href="http://chalkcat.com/index.php?action=pm;sa=send;u=25" rel="nofollow">Send a personal message to Michael</a></div><div class="pbm_item windowbg"><a href="http://chalkcat.com/index.php?action=emailuser;sa=email;msg=71217" rel="nofollow">Send an email to Michael</a></div><div class="pbm_item windowbg"><a href="http://chalkcat.com/index.php?action=profile;area=showposts;u=25" rel="nofollow">View Michael's posts</a></div><div class="pbm_item windowbg"><a href="http://chalkcat.com/index.php?action=buddy;u=25;e7f851d41bbe=787d868b008335e583bb754a37a2cef8">Add Michael to Buddy List</a></div></div>
</div>
</div>
<div id="footer_section">
<a href="#skipnav_top" id="toplink" title="Top"><span>Top</span>↑</a>
<ul class="smf_footer_links wrapper">
<li class="copyright">
<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"><a href="http://chalkcat.com/index.php?action=credits" title="Simple Machines Forum" target="_blank" class="new_win">SMF 2.0.9</a> |
<a href="http://www.simplemachines.org/about/smf/license.php" title="License" target="_blank" class="new_win">SMF &copy; 2014</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a><br /><a href="http://www.createaforum.com" target="_blank">Simple Audio Video Embedder</a>
</span></li>
<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="Valid XHTML 1.0!">XHTML</a></li>
<li><a id="button_wap2" href="http://chalkcat.com/index.php?wap2">WAP2</a></li>
<li class="theme_author"><a href="http://custom.simplemachines.org/themes/index.php?action=profile;u=129726" target="_blank" class="new_win">Apocalypse theme</a></li>
</ul>
</div>

<script type="text/javascript"><!-- // --><![CDATA[

// Create the news lines toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: false,
aSwappableContainers: [
'newslines_container'
],
aSwapImages: [
{
sId: 'newsupshrink',
srcExpanded: smf_images_url + '/collapse.png',
altExpanded: 'Hide news',
srcCollapsed: smf_images_url + '/expand.png',
altCollapsed: 'Show news'
}
],
oThemeOptions: {
bUseThemeSettings: true,
sOptionName: 'collapse_newslines',
sSessionVar: 'e7f851d41bbe',
sSessionId: '787d868b008335e583bb754a37a2cef8'
},
oCookieOptions: {
bUseCookie: false,
sCookieName: 'newsupshrink'
}
});

var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: true,
aSwappableContainers: [
'inner_section',
],
aSwapImages: [
{
sId: 'upshrink',
srcExpanded: smf_images_url + '/upshrink.png',
altExpanded: 'Shrink or expand the header.',
srcCollapsed: smf_images_url + '/upshrink2.png',
altCollapsed: 'Shrink or expand the header.'
}
],
oThemeOptions: {
bUseThemeSettings: true,
sOptionName: 'collapse_header',
sSessionVar: 'e7f851d41bbe',
sSessionId: '787d868b008335e583bb754a37a2cef8'
},
oCookieOptions: {
bUseCookie: false,
sCookieName: 'upshrink'
}
});

var oFooterContentToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: false,
aSwappableContainers: [
'footer_content',
],
aSwapImages: [
{
sId: 'footerupshrink',
srcExpanded: smf_images_url + '/upshrink.png',
altExpanded: 'Hide footer',
srcCollapsed: smf_images_url + '/upshrink2.png',
altCollapsed: 'Show footer'
}
],
oThemeOptions: {
bUseThemeSettings: true,
sOptionName: 'collapse_footer',
sSessionVar: 'e7f851d41bbe',
sSessionId: '787d868b008335e583bb754a37a2cef8'
},
oCookieOptions: {
bUseCookie: false,
sCookieName: 'footerupshrink'
}
});

// Begin jQuery section.
$.fn.ready(function() {

// Smooth scroll to top.
$("a[href=#skipnav_top]").on("click", function(e) {
e.preventDefault();
$("html,body").animate({scrollTop:0}, 1000);
});

// Smooth scroll to bottom.
$("a[href=#bot]").on("click", function(e) {
e.preventDefault();
$("html,body").animate({scrollTop:$(document).height()}, 1000);
});

$('#main_menu_hide').hide();

$("#main_menu_show").on("click", function(e) {
e.preventDefault();
$('div.menu_closed').addClass('menu_open');
$('#main_menu_show').hide();
$('#main_menu_hide').show();
});

$("#main_menu_hide").on("click", function(e) {
e.preventDefault();
$('div.menu_open').removeClass('menu_open');
$('#main_menu_hide').hide();
$('#main_menu_show').show();
});
});

// ]]></script>

<a id="bot"></a>
</body></html>

Antechinus

Oh yeah and if you feel like it, you can knock the height back to 132px here:

#blocksbox li.avatar {
height: 162px;
}


It should be on Line 4006. I sized it for avatars up to 150 high, and I notice you're using a 120 max on your site, so this would just clean up the memberlist slightly (make it a bit more compact).

Antechinus

#167
Ok, thinking about this a bit. You have two mods that want to call jQuery, and you want to run those site-wide of course. It'd also be good if this theme could be open slather since the more feedback the better.

So, best option for your site looks to be editing index.template.php so this theme doesn't call jQ at all, and the jQ stuff this theme wants to run is called after one of the mods has pulled the library in. This should work.

The trick is going to be figuring out which mod tries to call what on which pages, and where in what templates, so all bases are covered. Once that's figured out it should be easy to have this theme running nicely with your mods.

My gut is telling me that the best option is likely to be disabling the who mod's call for jQ 1.11 down the bottom of the template, and editing the Fancybox mod to call jQ 1.11 up in head. This should cover everyone, providing Fancybox is happy with jQ 1.11 instead of its original jQ 1.8. If it's working now, then it's obviously fine, so this plan is gonna work. :)

We can tee up a time when we both have brains and time, then I can throw edited files at you if you like.

busterone

Ok, I have had a really weird occurrence, but I think I have a temp fix for it.
After applying the patch, I started getting a new error in the log for group_id being undefined.  I tried adding a string into ThemeStrings.english.php to see if the error would go away-  $txt['group_id'] = 'Group ID';
The errors still persisted. I took a wild chance and added the same to the default theme's Modifications.english.php and the errors stopped.  go figure.  ???

Deaks

curious if you planning on leaving the hardcoded in index.template.php line 210 :P
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Antechinus

Line 210 of index.template.php is this one:

$body_class[] = 'topic_'. $context['current_topic'];

Yes, I am planning on leaving it.

Deaks

where you looking cause 210 says this

<a href="#skipnav" id="skipnav_top">Skip navigation</a>

their is 1 more bit of hardcoded but need to check if its in default or cause of you :P

Also theme_info is missing

<version>2.0.9</version>
or something like that :P
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Antechinus

I'm looking in the current version of the template on my local. You aint. Things are still in flux, and several features have been added since I posted that zip.

So, if you want to be helpful post the code that you think is problematic so I can look for that.

Anyway, yes, now that you have actually posted the code so I can see what you are talking about, of course I will change it.

Deaks

see :P

Anyway besides for that and the version I dont see any issues under quick look :P
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Antechinus

Good. I've fixed it already. Incidentally, what was the other bit of hardcoded text?

Deaks

calander.template.php line 803

But its also in the default theme so no need to worry about it :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Antechinus

See I threw in admin options for calling jQuery yesterday, as well as user options for choice of hover or click operation of drop menus. So that's this pile of stuff up in <head>.

if(empty($settings['jquery_source']) || $settings['jquery_source'] == 0)
{
echo '
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>';
}
elseif($settings['jquery_source'] == 1)
{
echo '
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.2.min.js"></script>';
}
elseif($settings['jquery_source'] == 2)
{
echo '
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery_1.11.2.min.js"></script>';
}

// Testing click menus.
if (!empty($options['use_click_menu']))
{
echo '
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/superclick.hoverIntent.theme.min.js"></script>
<script type="text/javascript"> $(document).ready(function() { $("ul.dropmenu").superclick(); }); </script>';
}
else
{
// Testing hover menus.
echo '
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/superfish.hoverIntent.theme.min.js"></script>
<script type="text/javascript"> $(document).ready(function() { $("ul.dropmenu").superfish(); }); </script>';
}


The skipnav stuff is now down on Line 230. :D

Antechinus

Quote from: Runic on January 11, 2015, 10:46:22 PM
calander.template.php line 803

But its also in the default theme so no need to worry about it :)

It's on Line 798 in my template. :D Yeah I think we can not worry about the ancient Easter eggs.

Deaks

yeh their are others but I know they are in default theme so nowt to worry about ill look again when you ready and give it full look over for you if you want :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Antechinus

Ok cool. Give it a day or two and I'll let you know. I've pretty much got my head around final features, barring some possible menu changes to make the gui better on phones, so should be able to sort it soon.

The main thing at the moment is getting the jQuery conflict kerfuffle sorted on Chalky's site so beta testing can continue. I've figured out a plan of attack for that.

The mod files responsible can be edited without fear of borking uninstall (if uninstall ever happens) since they're just straight extract/delete in the xml. So I'll whip those into shape and move my jQuery stuff after the headers from mods. That way this theme (with calling jQuery switched off), and all her other themes on the site, can run from the jQuery call the Fancybox mod throws in anyway. If Google CDN is ever blocked, just go into Apocalypse admin and call from jQuery CDN or local copy.

That can also be added into any other theme's index.template.php, and default's Settings.template.php, but given the chances of Google getting blocked I'll leave that up to her. I have enough to deal with already. :D

Advertisement: