solved User Profile Content Customization

ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
Hey everyone, i'm pretty new to this. :)
My first question is how do i add more than just the Action module to the Profiles front page.
I took a look into the profile_index.tpl and found:

    {jrCore_include module="jrAction" template="item_index.tpl"}

And now i'm wondering how to add something above like the tracklist.
I tried different ways but nothing worked:

    {jrCore_include module="jrAudio" template="item_index.tpl"}
    {jrCore_include module="jrAction" template="item_index.tpl"}


updated by @thisisderin: 07/19/14 10:11:16AM
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
My bad i forgot to hit the Active Button.

But i could need some help to get the Audio Player running on the Profile Page grabbing all Audio files or a playlist/album.
What i tried so far is:
{* default index for profile *}
<div style="padding-left: 26%;">
    {$profile_home|jrCore_format_string:$profile_quota_id}
    <br>
    {jrCore_include module="jrAudio-release-1.4.4" template="jrAudio_player_dark.tpl"}
</div>
<div class="col9 last">
    {jrCore_include module="jrAudio-release-1.4.4" template="item_index.tpl"}
</div>
But it says INVALID_MODULE so i quess i need to change some code on the player_dark.tpl ?
brian
@brian
11 years ago
10,149 posts
Welcome to the Jamroom forum!

You're on the right track - what you want to do however is remove the "template" - the "item_index.tpl" is designed to be the index for the module - i.e. an entire page.

Instead, you are going to want to actually do your listing in the index - i.e.

{jrCore_list module="jrAudio" profile_id=$_profile_id order_by="audio_display_order numerical_asc" pagebreak="6" page=$_post.p pager=true}

Would add an audio list. Note that the action template (modules/jrAction/template/item_index.tpl) is fairly complicated - you're going to want to tweak that to suit your needs.

Also - if you are looking to just get the audio page as the profile index (or allow your users to select what page they want to be their "index" page) make sure and check out the Profile Tweaks module:

https://www.jamroom.net/the-jamroom-network/networkmarket/2/profile-tweaks

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,149 posts
This:

jrAudio-release-1.4.4

should just be:

jrAudio

Don't look at directory names when you're doing the modules - the core handles all the linking/naming - you just want to use the directory name as shown in the "info" tab.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
Thank you Brian!
Well the listing is already there because the code you wrote is inside the item_index.tpl of jrAudio which i'm importing at the end of my code.
What i'm trying to do now, is to get a player above which is playing all tracks listed.
Here is an Image of what i got and what i want. ;)
img
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
Ok i think i almost got it. I hope :D
So this is a new .tpl with Player and List i want to import inside profile_index.tpl.
Now how do i get it to play all tracks of the profile?
Not just a single one or album.
{jrCore_module_url module="jrAudio" assign="murl"}
<div class="block">

    <div class="block_content">
            <div class="item">
                <div class="jraudio_detail_player">
                    <div class="jraudio_detail_player_left">
                        {assign var="ap" value="`$_conf.jrCore_active_skin`_auto_play"}
                        {jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" search1="_profile_id = `$_items.0._profile_id`" search2="audio_album = `$_items.0.audio_album`" order_by="audio_file_track numerical_asc" limit="50" autoplay=$_conf.$ap}
                    </div>
                    <div class="jraudio_detail_player_right">
                        {jrCore_module_function function="jrImage_display" module="jrAudio" type="audio_image" item_id=$_items.0._item_id size="large" class="iloutline img_shadow" alt=$_items.0.audio_title width=false height=false}
                    </div>
                </div>
            </div>
        {jrCore_list module="jrAudio" profile_id=$_profile_id order_by="audio_display_order numerical_asc" pagebreak="6" page=$_post.p pager=true}

    </div>

</div>
brian
@brian
11 years ago
10,149 posts
I think you're close - just show me the {jrMedia_player} code you added in to the header...

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,149 posts
Change this:

{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" search1="_profile_id = `$_items.0._profile_id`" search2="audio_album = `$_items.0.audio_album`" order_by="audio_file_track numerical_asc" limit="50" autoplay=$_conf.$ap}

to this:
{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" search1="_profile_id = `$_items.0._profile_id`" order_by="audio_file_track numerical_asc" limit="50" autoplay=$_conf.$ap}

Basically we removed the "search2" which was specifically looking for a specific album.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
What header file are you talking about? Can't find any {jrMedia_player} in the Skin header or profile_header files..

Ok thanks, i changed this. But still "jrCore_media_player: no media found for player". I quess cause of none {jrMedia_player} code huh?
brian
@brian
11 years ago
10,149 posts
Sorry - try this:

{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" search1="_profile_id = `$_profile_id`" order_by="audio_file_track numerical_asc" limit="50" autoplay=$_conf.$ap}

There is no $items array on the profile index - it is just $_profile_id.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
yes, works! thank you! now i can work on the next stuff :)
brian
@brian
11 years ago
10,149 posts
ThisisDerin:
yes, works! thank you! now i can work on the next stuff :)

Glad to hear it ;)

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
Profiles are looking great but there is one more little Problem.
I created a new module grabbing the content of the user via the form designer, which works fine. But the Link to it won't show up on the Profile Navigation.
I tried the All Users (incl. logged out) option. (i can see the content by entering the url manually)
Also Quota Config is set to Allowed on Profile for all Members. I think "Members" is the Problem here? Is there a way to set it visible for everyone?
SteveX
SteveX
@ultrajam
11 years ago
2,587 posts
Check that you have a menu language string in your module language file
/modules/myModule/lang/en-US.php

This is from the jrDocs module:
// Profile Menu Entry Name
$lang['menu'] = 'documentation';
You need to run the integrity check after adding that line.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
Yep thanks Steve, i got that, but thats not the reason.
The tab is visible when logged in but not when logged out.
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
May it helps when you check it live:
http://grindbeats.com/thisisderin
and the tab i want to have is "licenses"
http://grindbeats.com/thisisderin/licenses
SteveX
SteveX
@ultrajam
11 years ago
2,587 posts
Does your module have "items" for the profile?

If there are no listable items for that profile the tab only shows to the profile owner or admin (so that they can create the first item).

Does it show when logged in as someone other than the profile owner or an admin?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
What do you mean?
I created a item_index.tpl file for this module yes.
{jrCore_module_url module="jrLicenses" assign="murl"}
<div class="block">

    <div class="title">
        <h1>{jrCore_lang module="jrLicenses" id="19" default="Licenses"}</h1>
        <div class="breadcrumbs">
            <a href="{$jamroom_url}/{$profile_url}/">{$profile_name}</a> &raquo; {jrCore_lang module="jrLicenses" id="19" default="Licenses"}
        </div>
    </div>

    <div class="block_content">

        {$profile_licenses|jrCore_format_string:$profile_quota_id}

    </div>

</div>
In this file i import the text created by the user via form.
{$profile_licenses|jrCore_format_string:$profile_quota_id}

No, only profile owner and admin.
SteveX
SteveX
@ultrajam
11 years ago
2,587 posts
Create a license ("item") on the profile and the tab will appear.

The tab will only show to other users if there is something (a license) to list.

If there are no licenses, only the profile owner and admins will see the tab (they see the tab so they can create the first license).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
ThisisDerin
ThisisDerin
@thisisderin
11 years ago
11 posts
Ok that didn't work for me. But i solved this with a duplication of jrPage. :)
Thank you!

Tags