Forum Activity for @michael

michael
@michael
22 Aug 2019 10:15:31PM
7,020 posts

RSS Template Variables


Design and Skin Customization

You use a foreach loop to loop over the elements in an array, so if you have an array like this:
$the_array = array('cat', 'dog', 'ant eater');
then a foreach loop over it would go
{foreach $_the_array as $animal}
The animal is a {$animal}
{/foreach}

But if your array looks like this
$the_array = array('tom' => 'cat', 'bill' => 'dog', 'simon' => 'ant eater');
Then the foreach loop would look like this

{foreach $_the_array as $owner => $pet}
The pet of {$owner} is a {$pet}
{/foreach}

So it depends on what your array looks like as to how you access it outside a loop.

For the second array you can go
the pet of Simon is a {$the_array['simon']}
or
the pet of Simon is a {$the_array.simon}

to get Simons pet.
updated by @michael: 22 Aug 2019 10:16:57PM
michael
@michael
22 Aug 2019 10:04:48PM
7,020 posts

one thing i DO NOT like about the new editor


Suggestions

The fix is going to be adding:
contextmenu: false,
into
jrCore/form_editor.tpl
jrSiteBuilder/form_editor.tpl

The cause of the issue is the 'link' plugin:
https://www.tiny.cloud/docs/plugins/link/

and the 'contextmenu'
https://www.tiny.cloud/docs/ui-components/contextmenu

Quote: ....By default it does not disable the operating system’s native context menu, if there are no items to display at the cursor position the native context menu will be shown....
Since you can always link anything 'link' is turning up all the time. Even when what you want is really spellcheck.

Thanks for reporting this.
michael
@michael
22 Aug 2019 09:41:33PM
7,020 posts

one thing i DO NOT like about the new editor


Suggestions

Yeah, you're right. Where did that come from....

I'll see if I can get it back to what it was.

Thanks.
menu.jpg menu.jpg - 467KB
michael
@michael
20 Aug 2019 09:38:34PM
7,020 posts

ALLOW_ALL_DOMAINS missing


Installation and Configuration

You'd need to setup a page on your site that contains your player then embed that player in the other site using an iframe.

--edit--
Add a new page to your site by adding a .tpl file to your skin (or a clone of an existing skin), eg:
/skins/YOUR-SKIN/somename.tpl

That will can be accessed by going to
your-site.com/somename

and everything you add after that as parameters will be available in the {$_post} variable. so if you had
your-site.com/somename/song_id=55

Then you could get the value of song_id via the variable {$_post.song_id}.

You can use this to pass into the {jrCore_list} (the get stuff from the database function for any jamroom datastore.)

eg:
{jrCore_list module="jrAudio" search1="_item_id = `$_post['song_id']`"}


Then take a look at how the item_detail.tpl file of the jrAudio module does it to setup a player.
updated by @michael: 20 Aug 2019 09:44:26PM
michael
@michael
20 Aug 2019 09:36:52PM
7,020 posts

allow streaming from other sites (embedding players in other websites)


Installation and Configuration

Removed the docs the ALLOW_All_DOMAINS is no longer needed.
michael
@michael
20 Aug 2019 09:04:03PM
7,020 posts

Alt Image Tag Issue


Design and Skin Customization

How would you ".....For instance if i upload an image of a Bear I would name the file 'This is a bear'....."

If you're using a Windows PC I believe they hide the file extension of files so you cant see them (not sure). Each file will still have a file extension.

What I think you're after is in jrUpImg in the jrEmbed_item_list.tpl file. Add:
|substr:0:-4}
to the variable used in the ALT tag to trim the last 4 characters off of whatever is there. Maybe do the same for the TITLE="" variable too.

This location is for when you open the upload an image editor and click on one of the existing images.
{$item.upimg_file_name|addslashes}
to
{$item.upimg_file_name|addslashes|substr:0:-4}

four.jpg four.jpg - 417KB
michael
@michael
20 Aug 2019 08:37:43PM
7,020 posts

Lots Of Issues With Updates


Design and Skin Customization

Actually, your two issues appear to be connected. I was not seeing the issue with the BR's after paragraphs until I added an image with the upload image editor, then the extra line breaks appeared.

My guess is some change in the way the upimg module works is the cause of both the .jpg and the extra br's.

Will look into it.
brs.jpg brs.jpg - 295KB
michael
@michael
20 Aug 2019 08:30:49PM
7,020 posts

Lots Of Issues With Updates


Design and Skin Customization

Sounds like 'nl2br' is the cause of the extra line breaks at a guess. Im not seeing it here, but the fix is probably:
* take a look in your template for wherever its displaying and if it did look like this:
{$item.blog_text|jrCore_format_string:$item.profile_quota_id}
Then block 'nl2br' by changing it to this:
{$item.blog_text|jrCore_format_string:$item.profile_quota_id:null:nl2br}

That code is for BLOG though, so it depends on what module your using as to whether the base variable is the same or not.

--edit--
not seeing the issue in blogs, where are you seeing it?
blog.jpg blog.jpg - 488KB

updated by @michael: 20 Aug 2019 08:32:44PM
michael
@michael
19 Aug 2019 06:42:17PM
7,020 posts

If/Else Loops in Templates: Question


Using Jamroom

Almost right

Docs: "{debug}: Arrays"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug#arrays

try
{if $_post['option'] == 'adjectives'}
blah blah
{/if}
or
{if $_post['_1'] == 'adjectives'}
blah blah
{/if}
michael
@michael
17 Aug 2019 05:35:17PM
7,020 posts

Wishing Simple Podcast Fields For Audio Module


Suggestions

User side audio form will be added using the Form Designer.

Output is handled by the templates, so probably "Using the Template Editor" or skin customization.

Docs: "Using the Form Designer"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/1275/using-the-form-designer

Docs: "Using the template editor"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/3183/using-the-template-editor
1