Forum Activity for @ken-rich

Ken Rich
@ken-rich
05/31/16 02:38:05PM
926 posts

Packaging Module for Marketplace.


Design and Skin Customization

I hear you on the support part of it, because I had so many problems with a particular 3rd party developer before.

Here's the thing though. The module I made works beautifully and fulfils a much-needed function that Jamroom lacks.

Your sales are all over the place on different tabs. An artist can't promote one URL and have a visitor land on a page where ALL of his different categories of products, services, bundles, files, songs, and videos are shown on a storefront.

If he promotes his audio page for instance, his physical products are not seen unless the visitor opens that tab. My module pulls everything together on one page, with the ability to customize the space above the listings with an editor and assign SEO metadata for shares.

I have a number of "Member Stores" on my network now where that functionality exists. http://indiegospel.net/sales

So is there some type of way to make this functionality available to others or do they need to "reinvent the wheel".

It would be a shame if they did. It would also be a shame if alot of people installed it, then Jamroom makes an update that screws up the module and I can't fix it - so I can see your point there.
updated by @ken-rich: 05/31/16 02:50:52PM
Ken Rich
@ken-rich
05/30/16 07:55:10AM
926 posts

Packaging Module for Marketplace.


Design and Skin Customization

I created a module with the xx designation which I believe from something I read makes it private.

So I am under the impression that now that I am confident in the module, if I want to put it in the marketplace the xx must change to something new like kr for Ken Rich.

If so, is "search and replace" my fastest option and is that the only thing that needs to be done before it can be put in the marketplace?
updated by @ken-rich: 09/13/16 02:38:43PM
Ken Rich
@ken-rich
05/30/16 04:30:23AM
926 posts

Display a New Module Template?


Design and Skin Customization

After dozens and dozens of attempts, I finally stumbled upon a solution. I remembered seeing Michael in a video typing (in regular text) something like value = x where x was something from an array.

So I typed in profile ID = {$_user.profile_id} and sure enough the profile ID showed. So I couldn't understand why it wouldn't work in the search.

Then it struck me - try putting the { } around it and see what happens. Sure enough it worked so my suspicion was correct, it was a syntax problem I was stumbling over.

Perhaps because I'm a novice I don't know the rules on when { } is necessary. Is there a link to those rules?

The working code is this:

 {jrCore_list module="xxSales" template="campaign_list.tpl" search1="_item_id > 0" search2="profile_id = {$_user.profile_id}" order_by="_created desc" pagebreak="10" pager="true" page=$_post.p } 

updated by @ken-rich: 05/31/16 07:52:15PM
Ken Rich
@ken-rich
05/29/16 07:10:23PM
926 posts

Display a New Module Template?


Design and Skin Customization

Hi Douglas,

That just gives me a blank but I was thinjing the same thing. I can see with the debug that under $_user there is both profile_id and _profile_id.

So I would expect that either could be used as in:

{jrCore_list module="xxSales" search1="_item_id > 0" search2="profile_id = $_user.profile_id" order_by="_created desc" pagebreak="10" pager="true" page=$_post.p }

However, that and every permutation of it (syntax variations) I've tried just gives me a blank.
updated by @ken-rich: 05/30/16 04:33:59AM
Ken Rich
@ken-rich
05/29/16 07:03:02PM
926 posts

Display a New Module Template?


Design and Skin Customization

Hi Michael,

Yes, if I plug in individual profile id's then it works correctly in that it only shows the items belonging to that id.

So the trick is, how do I tell it the profile id of the visitor?
Ken Rich
@ken-rich
05/28/16 07:20:55AM
926 posts

Display a New Module Template?


Design and Skin Customization

I am still trying to make my list work right. I have no problem to make it list ALL sales campaigns (items) - http://indiegospel.net/campaigns

However, after studying jrList and the tips I've received from staff, I still can't find a way to make it list ONLY the items created by the profile owner who is viewing it. So if I am logged in and go there, I should see ONLY the two I created in my profile, not everyone else's along with my own.

Inside the module, as the item_index.tpl it would do that but as a skin page it behaves differently. I don't understand why, or how to achieve that same functionality.

I know the list can be narrowed with an additional search parameter, but none of the ones I have tried have had the desired outcome.

So I am stuck here:

{jrCore_list module="xxSales" template="campaign_list.tpl" search1="_item_id > 0" search2="_______" order_by="_created desc" pagebreak="10" pager="true" page=$_post.p }
Ken Rich
@ken-rich
05/26/16 09:44:03AM
926 posts

Display a New Module Template?


Design and Skin Customization

brian: You can pass in variables as well - i.e. yoursite.com/whatever/brian
The $_post.option variable would contain "brian" in the whatever.tpl file

It probably seems so elementary to you as to not need elaboration but nevertheless, I am not following - dooh! The reason is when I look in the debug I don't see anything under $_post relating to profile names or users. So I can't see how that could possibly provide the solution.

Are you saying this code {$jamroom_url}/WHATEVER/{$_post.option} will cause the WHATEVER template to display ONLY the items of the user visiting it?

brian: Then modify the skins/Active_Skin/profile_item_index.tpl. EVERY module's "item_index.tpl" file is rendered FIRST, then the contents are displayed using that template.

I went to that template and the only thing there is
{$profile_item_list_content}

A couple things come to mind:

1) If EVERY module is using this won't my mod affect EVERY module. Unless you are suggesting I implement some type of IF/ELSE statement that targets my module alone.

Perhaps something like:

 {if $_params.module == "xxSales"}
   {jrCore_module_url module="xxSales" assign="murl"}
{if isset($_items)}

    {foreach from=$_items item="item"}

    <div class="item">

        <div class="container">
            <div class="row">
                <div class="col4">
                    <div class="block_image">
                        <a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.sales_title_url}">{jrCore_module_function function="jrImage_display" module="xxSales" type="sales_image" item_id=$item._item_id size="512" class="img_scale"  alt=$item.sales_title width=false height=false} </a>
                    </div>
                </div>
                <div class="col8">
                    <div class="p10" style="overflow-wrap:break-word;vertical-align:top">
                        <h2><a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.sales_title_url}">{$item.sales_title}</a></h2><br>
 
                        <div style="font-size:16px;"><br>{$item.sales_text|truncate:270}<br><br></div>
                       
                    </div>
                </div>

                
                    
                       </div>
                </div>
                </div>
                
                
    {/foreach}
{/if}
{/if}            

Is that the sort of thing you are suggesting?
updated by @ken-rich: 05/26/16 09:50:52AM
Ken Rich
@ken-rich
05/26/16 09:11:06AM
926 posts

Display a New Module Template?


Design and Skin Customization

Hi Michael,

Thanks - that would be awesome. If you give me your PayPal address I can reimburse shipping.

(addressed removed)

=========================================

I have learned to use debug on a regular basis and am somewhat familiar with the jrCore list commands (but not adept).

I have created a page using the sitebuilder's list function that ALMOST does what I need:

It lists my module's items exactly the way I want EXCEPT that it is displaying items from ALL item creators. I need it to list ONLY the items of the user who is viewing it. So I am looking for a search parameter to accomplish that. This is what I have so far:

TEMPLATE CODE:
{jrCore_list module="xxSales" search1="_item_id > 0" order_by="_created desc" pagebreak="10" pager="true" page=$_post.p }

CUSTOM TEMPLATE:
{jrCore_module_url module="xxSales" assign="murl"}
{if isset($_items)}
    {foreach from=$_items item="item"}
    <div class="item">
        <div class="container">
            <div class="row">
                <div class="col4">
                    <div class="block_image">
                        <a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.sales_title_url}">{jrCore_module_function function="jrImage_display" module="xxSales" type="sales_image" item_id=$item._item_id size="512" class="img_scale"  alt=$item.sales_title width=false height=false} </a>                </div>
                </div>
                <div class="col8">
                    <div class="p10" style="overflow-wrap:break-word;vertical-align:top">
                        <h2><a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.sales_title_url}">{$item.sales_title}</a></h2><br> 
                        <div style="font-size:16px;"><br>{$item.sales_text|truncate:270}<br><br></div>                       
                    </div>
                </div>              
                </div>
                </div>
                </div>               
                {/foreach}
{/if}
Ken Rich
@ken-rich
05/25/16 06:00:56PM
926 posts

Display a New Module Template?


Design and Skin Customization

Thanks Michael,

Since what I need often doesn't exist there are some things I need to create. I live on a TINY disability pension but even if it's something small and within my budget, I usually can't find a developer. So I am learning as best I can.

In this latest situation, I have created a page with sitebuilder and the list function. I now have everyone's items from my module listing properly. I have no problem creating a button from the item_index of my module to open that page.

The only thing I can't figure out is how to make it list ONLY the items from my module of the user who is viewing it, not all items from everyone.

So I figure it has something to do with $user or $profile_id but I can't make it work.

That's the only trick I need to solve my current dilemma.
Ken Rich
@ken-rich
05/25/16 01:00:42PM
926 posts

Display a New Module Template?


Design and Skin Customization

Hi Brian,

Quote: Brian: That is not correct.
If it's not correct, then perhaps it should be written in the docs a little differently, so that novices like myself won't make that assumption.

Quote: Brian: Yep - unless you want to learn module development, creating custom templates for modules is NOT what you want to do.
This leads me to believe my first assumption wasn't wrong but that there is indeed an advanced technique which would make a new (custom) template work in a module. So at this point, I rather suspect there are two paths, one too advanced for me, and another you are attempting to make me understand.

Quote: Brian: I'm not sure why you would waste hours when I had already posted that you were going about this the wrong way. You already pointed you are NOT a developer, so you want to avoid doing things that require you to be a developer.

It's not your fault. You didn't enlighten me until after I had ALREADY wasted many manhours and THEN asked for help in the forum (after the fact). I hate bothering you guys, I know you are busy, so I try to go by the docs and trial and error if I can. Usually, I can muddle through (not this time).

Now if the docs had said something like "this is an advanced technique, if you want a simple way to show a profile and module specific page you don't need a new module template read this LINK___________." Or if my searches would have turned up the easier way you are suggesting, I wouldn't have gone down this "rabbit trail".

That's why I am suggesting that maybe the easy way needs to be clarified in the docs, perhaps with an example for novices, since I rather expect I'll be hours more tinkering with codes trying to make this work. At least I am on the right "rabbit trail" now - lol.
updated by @ken-rich: 05/25/16 03:03:56PM
  11