Stoker wrote:When submitting mods on phpbb.com latest jquery must be used.
You'd better update it to 1.7 then

Stoker wrote:When submitting mods on phpbb.com latest jquery must be used.
LOL... Still makes me wonder, would not using the CDN and latest make more sense... (not that it would make any difference when it comes to the pretty much dead validation queue).Stoker wrote: Dammit![]()
Code: Select all
if (typeof jQuery == 'undefined')
{
// not loaded, go load it here
} else {
// already loaded, do not load again
}
For validation? Yeah, I know... however, looking at the "progress" when it comes to mods validation over there @phpbb.com, I have serious doubts about the whole idea of validation, as it stands... there simply is stuff that is not worth getting validated at all, since - unless the scripts are remote - they break more quickly than the mods get validated. (Think, Facebook, +1 and similar kind of stuff.) For MODs having some ACP configuration, a checkbox to use either the CDN or the local version (could be the default) would make sense regardless. (No idea whether it would get validated if done that way or not, and frankly I do not care.)Stoker wrote:Using remote scripts in mods wont get accepted. So thats a dead end.
Code: Select all
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
document.write(unescape('%3Cscript src="{ROOT_PATH}script/jquery-1.7.min.js" type="text/javascript"%3E%3C/script%3E'));
}
</script>
Neat little trick tydoktornotor wrote:So, back to the jQuery check... Changed the mod to use this in overall_header.html
Works nicely.Code: Select all
<script type="text/javascript"> if (typeof jQuery == 'undefined') { document.write(unescape('%3Cscript src="{ROOT_PATH}script/jquery-1.7.min.js" type="text/javascript"%3E%3C/script%3E')); } </script>
Code: Select all
<!-- Start Recent Active Topics -->
<table class="tablebg" cellspacing="1" width="100%">
<tr>
<th colspan="2"> {L_RECENT_ACTIVE} </th>
<th width="50"> {L_REPLIES} </th>
<th width="50"> {L_VIEWS} </th>
<th> {L_LAST_POST} </th>
</tr>
<!-- BEGIN recent_active -->
<tr>
<td class="row1" width="50" align="center"><img src="{ROOT_PATH}images/starimg.png" width="27" height="27" alt="" /></td>
<td class="row1" width="100%">
<a class="forumlink" href="{recent_active.U_FIRST_TOPIC}">{recent_active.TOPIC_TITLE}</a>
<p class="forumdesc">{L_POST_BY_AUTHOR} <a style="font-weight:bold; color: #{recent_active.TOPIC_FIRST_POSTER_COLOUR};" href="{recent_active.USERNAME_FIRST}">{recent_active.TOPIC_FIRST_POSTER_NAME}</a> {recent_active.TOPIC_TIME}</p>
</td>
<td class="row2" align="center"><p class="topicdetails">{recent_active.TOPIC_REPLIES}</p></td>
<td class="row2" align="center"><p class="topicdetails">{recent_active.TOPIC_VIEWS}</p></td>
<td class="row2" align="center" nowrap="nowrap">
<p class="topicdetails">{recent_active.TOPIC_LAST_POST_TIME}</p>
<p class="topicdetails"><a style="font-weight:bold; color: #{recent_active.TOPIC_LAST_POSTER_COLOUR};" href="{recent_active.USERNAME_LAST}">{recent_active.TOPIC_LAST_POSTER_NAME}</a> <a href="{recent_active.U_LAST_TOPIC}">{LAST_POST_IMG}</a>
</p>
</td>
</tr>
<!-- END recent_active -->
</table>
<br />
<!-- End Recent Active Topics -->