Forum Activity for @ken-rich

Ken Rich
@ken-rich
03/27/16 12:17:30PM
926 posts

One Editable Space - Not Unlimited


Design and Skin Customization

OK - perhaps this will help. Refer to the attached screenshot.

I expected to see an editor output like that of the profile builder but instead got that.

So that's what I mean by displaying a bunch of things I didn't want.

So I stripped the item detail down to:

{jrCore_module_url module="xxSales" assign="murl"}             
                        <div class="container">  
                           {if strlen($item.sales_editor) > 0}     
{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}
{/if}                    
                </div>

Moreover, I changed the item_list.tpl to this:

{jrCore_module_url module="xxSales" assign="murl"}
{if isset($_items)}
    {foreach from=$_items item="item"}
        <div class="item">
            <div class="block_config">
              {jrCore_item_list_buttons module="xxSales" item=$item}              
            </div>
{if strlen($item.sales_editor) > 0}     
{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}
           {/if} 
            <br></div>
    {/foreach}
{/if}


In the item_index.tml I believe this section is responsible for the display:

   <div class="block_content">
{jrCore_list module="xxSales" profile_id=$_profile_id order_by="_created asc" pagebreak="4" page=$_post.p pager=true}

</div>

Now this is working out fine for me except that I only want one editable space on the top of the Sales page (like the profile_index functions), but this set-up creates unlimited editable spaces.

I am thinking that perhaps I need to shut off the create function in the sales_editor and just use modify. However, then I don't know how the initial space can be created.
sales.JPG.jpg sales.JPG.jpg - 37KB

updated by @ken-rich: 03/27/16 12:24:30PM
Ken Rich
@ken-rich
03/27/16 06:15:40AM
926 posts

One Editable Space - Not Unlimited


Design and Skin Customization

Ah... Well I simply added an editor to the existing form that came default with the module created by Aparna.

Since the module I created was called Sales, I called the editor I added to the form sales_editor and in the item detail and list templates I added:

{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}

I stripped away everything else that seemed to be superfluous in those templates since things I didn't want were showing up by default.

Perhaps this issue is as simple as only having modify, not create, in the editor section of the form? But then how would the initial custom space be created? The profile owner can't modify what is not there?

Unless a default blank space can be created for them to modify? Then the create functionality could be deactivated on the form. Then like the profile editor, they would then only have a cogwheel for modify, not a plus button to make more entries that become listed.

I suspect the answer is along those lines, but how to implement so they have a default space to modify is what I don't know how to implement.
updated by @ken-rich: 03/27/16 06:27:23AM
Ken Rich
@ken-rich
03/26/16 10:59:16PM
926 posts

One Editable Space - Not Unlimited


Design and Skin Customization

I have made it so an editor controls the space on top of this page http://kenrich.me/sales

However, it is able to make unlimited additional "posts" for lack of a better term.

I would like it to operate like the profile index page where there is only one editable space not the ability to create endless ones that all become listed.

How can this be accomplished?
updated by @ken-rich: 07/05/16 09:06:00PM
Ken Rich
@ken-rich
03/26/16 10:49:38PM
926 posts

Wrong Metadata on New Module


Design and Skin Customization

I'm pretty happy with my new module except it is taking the generic metadata from my network, instead of generating its own OG image and description.

So this page - http://kenrich.me/sales is sharing on Facebook like the attached screenshot.

Given that the whole idea of the module is to allow all saleable items from a profile to be promotable from one page, this is huge issue, since it can't be promoted with the right metadata.
Capturejjjj.JPG.jpg Capturejjjj.JPG.jpg - 28KB

updated by @ken-rich: 06/26/16 12:36:38AM
Ken Rich
@ken-rich
03/26/16 10:35:28PM
926 posts

Combined Sales Page on Profiles


Design and Skin Customization

Had to write it like this was the solution.
{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}

I have another question but I'll start a new thread to avoid confusion.
Ken Rich
@ken-rich
03/26/16 02:13:18PM
926 posts

Why Don't Codes Render?


Design and Skin Customization

Hi Michael,

Actually, I did find a clue in that other thread you pointed me too - thanks.

My problem was that in the detail and list templates I apparently did not have the full code.

I was using
{$item.sales_editor}

Instead of
{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}

I didn't know I needed the second part of that since Paul gave me a code which worked for adding lyrics with an editor in the audio form and it is working fine without the second part.

It was the "model" I followed.

{if strlen($item.audio_lyrics) > 0}
     {$item.audio_lyrics}
{/if}

So it's working now but I'm still confused as to why that second part
|jrCore_format_string:$item.profile_quota_id
is necessary in my new "Combined Sales" module but isn't necessary in the "Audio" module where I added an editor for lyrics to the form.

Hmmmm....?????
Ken Rich
@ken-rich
03/26/16 12:03:17AM
926 posts

Why Don't Codes Render?


Design and Skin Customization

I've looked at that thread. There is a lot going on there, I'm not sure what applies to my situation or how to implement.

Are you saying I need to modify my module's include.php file and add a listener for jrEmbed's "output_html" event - i.e. in your init:

Then create myModule/templates/embed.tpl

That task seems "daunting" and the instructions would need to be dumbed down a little more for me to follow.
Ken Rich
@ken-rich
03/24/16 06:05:18PM
926 posts

Why Don't Codes Render?


Design and Skin Customization

Yes "Convert Embed Tags" is enabled in all my quotas and works in other installations of the editor, just not in the new module I created.

Here is a "live" example of the combined sales module. I am ready to roll with it except for this one issue.

http://kenrich.me/sales
updated by @ken-rich: 03/25/16 10:35:03AM
Ken Rich
@ken-rich
03/24/16 10:00:24AM
926 posts

Why Don't Codes Render?


Design and Skin Customization

On a new module created with Aparna, if one adds an editor to the form, what must one do to get embed codes to render?

For example
[jrEmbed module="jrAudio" id="1063"]
should produce a player but instead only the code for the player displays.
updated by @ken-rich: 06/26/16 09:21:48PM
Ken Rich
@ken-rich
03/23/16 01:25:40PM
926 posts

Combined Sales Page on Profiles


Design and Skin Customization

By trial and error I've gotten closer.

However, I can't figure out why enbedded codes won't render.

For example -
[jrEmbed module="jrAudio" id="1063"]
will not show the player, it will show the code.

This was occurring when the templates were at default so I don't believe it is due to my modifications.

item_list.tpl has been changed to:

{jrCore_module_url module="xxSales" assign="murl"}
{if isset($_items)}
    {foreach from=$_items item="item"}
        <div class="item">

            <div class="block_config">
              {jrCore_item_list_buttons module="xxSales" item=$item}
              
            </div>
{$item.sales_editor}
            
            <br>
        </div>

    {/foreach}
{/if}



item_detail.tpl has ben changed to:

{jrCore_module_url module="xxSales" assign="murl"}

             
                        <div class="container">
  
                           {if strlen($item.sales_editor) > 0}
     {$item.sales_editor}
{/if}
                      
                </div>
  16