Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
Modifying Control Panel
IndieNation



Joined: 27 Apr 2008
Posts: 24

Posted: 02/25/09 18:09 
I would like to make some modifications to the artist's control panel. I'm still poking around trying to get familiar with the coding conventions and the functions and variables that are already available, so please forgive me if I ask a questions, that to an experienced JamRoom developer seems elementary -

That said - What I would like to do is be able to have the view different based on the quota that the artist is currently signed up for.

Example: New - Free Account - There would be the top section of the control panel referring them to a page or section where they could compare the different options (in our case free vs. Gold vs. Platinum) Along with their pricing - and a click here to Upgrade -

Gold - would be slightly different, in that it might show options they are missing and encouraging them to upgrade to Platinum (but not obnoxious) -

Platinum would obviously not have any link to upgrade, but show not only their join date, but also their expiration date (some may choose our quarterly or semi-annual plans).

I would also like to be able to create in the future Notes: for all members about new things happening or changes in the system (but I don't want these to appear on the front of the site) - this could even be used to let them know when the system is going to be down for maintenance - These are just ideas for the future but gives you and idea of the things I want to be able to accomplish here.

Additionally I was thinking about special icons for Gold and Platinum members when they appear to visitors and when they post in the forums/blog.

All of that described - I've looked at the admin.php file and I've taken note the opening of code does identify if the user is "admin", artists or member - which is a start in the right direction - In looking further at that code I noticed that it then recognizes by the quota whether the user is a Member or an artists - so we are half way there - Where I want to take this on my fist step is for the system to recognize, not just that they are an artist, but Free Artist, Gold Artist or Platinum.

Are there already function/variable calls in the system that I would employ to create the additional "Case" code (I don't want to recreate the wheel here)? And has anyone in the past done anything similar to this that could point me in a good direct.

I'll continue to go over all the functions/variables in the developers guide, but I thought I would ask straight out so see if I could shorten my research time.

Any input would be much appreciated.

Thanks in advance -

Ruth

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 02/25/09 18:47 
Ruth -

You actually shouldn't need to do anything with the jamroom php functions. You should be able to accomplish all of this by modifying the jamroom control panel templates. this page has info on that and should help:

http://www.jamroom.net/Jamroom_Control_Panel_Templates

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
IndieNation



Joined: 27 Apr 2008
Posts: 24

Posted: 02/26/09 14:45 
Thank you for your reply, but I don't think you understood my question(s). I know what files require modification and had already read through the docs in general in order to accomplish my changes; however I was looking to see if there were specific variables that exist to do what I need as there are a mountain of available variables.

The hopes was someone had "been there - done that" and could shorten my time to get this done, but apparently not so... I'm just going to go back to my original track and research and read all the available variables and if I need to create new ones for my changes, I'll do just that.

Thanks again for taking the time to post. I know your time is precious.

Ruth

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 02/26/09 15:15 
You would be able to get the quota_id from the $_user array and then display according to what you want that quota to see.

If you are working in a control panel smarty template put {debug output="html"} in to see the variables in the user array. If you are in a php file (in a module) use debug($_user);


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
IndieNation



Joined: 27 Apr 2008
Posts: 24

Posted: 02/26/09 15:40 
thanks, great info! Soon I will get more familiar with this environment and know all the little tips and trick!!

Quick question - In reading through functions/variables - I found this -
Quote:
{jr_theme_comment} is used for embedding comments into a Jamroom Profile page template. Note: {jr_theme_comment} is a deprecated function, and should no longer be used in Jamroom 4.1 and newer. The {jr_ranking} template function can perform the same functions as the {jr_theme_comment} template function, but with better support. This page has been left here for reference purposes only.


Now when I check our jr_ranking - I find nothing that gives me the new parameter to add comments to the profile -

A thought I had was to duplicate the existing module "admin_blog" and create admin_comments - with some changes - first of all create a drop down menu with a list of the available quotas pulled from the array - or an all quotas option - so that the admin can enter a comment that is to be displayed on the appropriate quota control panel. Thus I'm trying to identify any functions/variable that currently exist that I can use or I don't "step on" if I have to create new ones. This would be just a super way for the admin to communicate with users and customize it to each specific quota - As I mentioned I don't want this info on the home page as it is not Global -

Back to top
IndieNation



Joined: 27 Apr 2008
Posts: 24

Posted: 02/26/09 15:44 
Ok, think I may have found exactly what I need. Sooooo much to read and I'm on an short time frame - Looks like what I'm looking for might be the login notes - reading on......... and on.... LOL

Ruth

Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 02/26/09 15:50 
If I understand your intentions here, I would probably use admin blog categories and/or a custom form field to achieve this.

You would then rank your admin blogs for that particular category or custom form field value and display that in the quota login note or other part of the control panel.

You would need to adjust your existing ranking call for the admin blog as well so that these quota control panel notes don't show on the front end.

Another option would be to create an artist quota called "control panel notes" specifically for the purpose, and then adjust your skin artist blog rankings and spotlights etc to ignore that quota.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 02/26/09 15:51 
Yes, changing the login note for each quota would be the simplest and fastest option.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
IndieNation



Joined: 27 Apr 2008
Posts: 24

Posted: 02/26/09 16:58 
Ok, I'm now reading over both the .tpl and the 0.tpl (login_notes) and the docs referring to that. One small confusion - Per what I'm reading
Quote:
Where #quota_id# is the quota of the user logging in. The Jamroom Master Admin is quota_id 0, so when logging in as the master admin, Jamroom will look for login_note_0.tpl.
then if I have the following quotas setup - Free Artists, Gold Artist and Platinum - when I check the db really quick I can see the id's - now that said, In the docs it states id= '0' is the admin thus login_note_0.tpl is only seen by the admin - yet in my quotas in the db Id '0' is actually the visitor quota - that is a bit confusing as to where the quota_id is being pulled from.

So.. ignoring that bit of confusion - I would create the following templates: login_note_1.tpl (free Artists) login_note_2.tpl (Gold Artists) login_note_3.tpl - (Platinum Artists) - Is that correct? And that said the system is currently designed to automatically pull those templates if they exist in the skin/cp directory.

Ruth

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 03/05/09 12:48 

IndieNation:
Ok, I'm now reading over both the .tpl and the 0.tpl (login_notes) and the docs referring to that. One small confusion - Per what I'm reading
Quote:
Where #quota_id# is the quota of the user logging in. The Jamroom Master Admin is quota_id 0, so when logging in as the master admin, Jamroom will look for login_note_0.tpl.
then if I have the following quotas setup - Free Artists, Gold Artist and Platinum - when I check the db really quick I can see the id's - now that said, In the docs it states id= '0' is the admin thus login_note_0.tpl is only seen by the admin - yet in my quotas in the db Id '0' is actually the visitor quota - that is a bit confusing as to where the quota_id is being pulled from.


Since a visitor can never see a login note, the admin get's 0 in the login notes.


Quote:

So.. ignoring that bit of confusion - I would create the following templates: login_note_1.tpl (free Artists) login_note_2.tpl (Gold Artists) login_note_3.tpl - (Platinum Artists) - Is that correct? And that said the system is currently designed to automatically pull those templates if they exist in the skin/cp directory.

Ruth


yes - that is correct. If Jamroom cannot find one specific to the quota, it will use the login_note_default.tpl.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
jimmyk
Beta Team


Joined: 27 Jun 2007
Posts: 275
Location: Bethlehem, PA USA

Posted: 03/11/09 15:58 
Think of the login notes this way... treat them as any other template on the site. If you know Jamroom and how to use ranking calls you can create really complex login notes.

My login note for level 3 member is over 1000 lines long. Just remember... as long as you pull it from a ranking call you can get what you need. There are also many variables available without the ranking call. What really helped me was the jr_counts which is in the DOC. You can get allot of data to display using the band_id.

Also, if you want to see what is available on a page add this to the page:

{debug output="html"}


_________________
Web Development
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.