Code Question 3
Using Jamroom
Again, here is the lovely content featuring code that works well and is truly impressive (at least to me). First of all the code looks like this:
<div class="col12 last">
{if jrCore_is_mobile_device()}<div class="menu_tab">
<div id="default" class="p_choice fartist" onclick="jrLoad('#sm','{$jamroom_url}/index_artists');jrSetActive('
<div id="s_song" class="p_choice fsong" onclick="jrLoad('#sm','{$jamroom_url}/index_songs');jrSetActive('
<div id="s_video" class="p_choice fvideo" onclick="jrLoad('#sm','{$jamroom_url}/index_videos');jrSetActive('
{else}
<div class="menu_tab">
<div id="default" class="p_choice fartist" onclick="jrLoad('#sm','{$jamroom_url}/index_artists');jrSetActive('
<div id="s_song" class="p_choice fsong" onclick="jrLoad('#sm','{$jamroom_url}/index_songs');jrSetActive('
<div id="s_soundcloud" class="p_choice fsoundcloud" onclick="jrLoad('#sm','{$jamroom_url}/index_soundclouds');jrSetActive('
<div id="s_video" class="p_choice fvideo" onclick="jrLoad('#sm','{$jamroom_url}/index_videos');jrSetActive('
<div id="s_youtube" class="p_choice fyoutube" onclick="jrLoad('#sm','{$jamroom_url}/index_youtubes');jrSetActive('
<div id="s_vimeo" class="p_choice fvimeo" onclick="jrLoad('#sm','{$jamroom_url}/index_vimeos');jrSetActive('
<div class="clear"></div>
</div>{/if}
<div class="inner mb8">
<div id="sm"></div>
</div>
</div>
</div>
At the top of the index page, this code is used to call up the initialization protocol in Java...
<script type="text/javascript">
$(document).ready(function(){
jrSkinInit();
});
</script>
In the java folder, the actual initialization protocol being called up looks like this:
function jrSkinInit() {
jrLoad('#sm',core_system_url +'/index_artists');
jrLoad('#top_members',core_system_url +'/top_members');
jrLoad('#top_songs',core_system_url +'/top_songs');
jrLoad('#top_groups',core_system_url +'/top_groups');
jrLoad('#top_discussions',core_system_url +'/top_discussions');
jrLoad('#top_notes',core_system_url +'/top_notes');
jrLoad('#top_actions',core_system_url +'/top_actions');
jrLoad('#top_blogs',core_system_url +'/top_blogs');
jrLoad('#top_galleries',core_system_url +'/top_galleries');
jrSetActive('#default');
}
If one were to install this on Ninga what would be the steps?
1. I would imagine all the java would need to be copied over.
2. index_artists_row.tpl as detailed in "Code Question 1" as well (separate thread).
3. Am I correct in thinking that the division id's and classes relate to CSS, therefore some CSS values would have to be copied over too?
What I mean by 3 is (if I am understanding correctly), the pointers would have to be changed to Ningja specific ones. That is, things like "div inner mb8 mr8" would have to be renamed to existing Ningja values, or those associated NingNova2 values would have to be incorporated into the Ningja stylesheets???
updated by @ken-rich: 01/09/15 06:55:58AM