Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Help:
Adding TinyMCE in Jr5
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/12/13 19:44 
Hi, in a module i have a form in the admin side. what is the best way to add Tiny_MCE to some text boxes.

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/13/13 00:12 
Here is the example from the blog editor:
/modules/jrBlog/index.php

Code

    // Blog Text
    $_tmp = array(
        'name'     => 'blog_text',
        'label'    => 7,
        'help'     => 8,
        'type'     => 'editor',
        'theme'    => 'advanced',
        'validate' => 'allowed_html',
        'required' => true
    );
    jrCore_form_field_create($_tmp);


'type' = 'editor' is the part that puts the editor in the box.

Documentation should be up soon.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/13/13 00:57 
Hey thanks for that now another thing when i try and embed video

[jrEmbed module="jrVideo" id="417"]

The Tinymce is reading it how it is and not running [jrEmbed module="jrVideo" id="417"]

You know what i mean?

So the text shows : [jrEmbed module="jrVideo" id="417"]

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/13/13 21:47 
your best source of info right now is looking at how other modules do it.

Try looking inside the jrBlog module's item_details.tpl page as you know that has an example of what your trying to do that works.

When it outputs the variable that displays the blog post it looks like this:

Code
 {$item.blog_text|jrCore_format_string:$item.profile_quota_id|jrEmbed_embed}


What does your template variable look like?


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/13/13 22:11 
When you embed soemthing from the Tinymce, inser a video such as [jrEmbed module="jrVideo" id="417"]

How does the tpl read it? it's like the system is not picking up that it is a video. its isnerting in the page as plan text.

Hope you got me

Back to top
smith.kyle
CodeSmith


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

Posted: 09/16/13 10:18 
The text in a textarea is not processed as a template (I believe) - that text is injected after the template is compiled to my knowledge.

Kyle


_________________
kyle[at]jamroom.net

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

I get bored when no one's posting...
Back to top
Brian
Jamroom Team


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

Posted: 09/16/13 10:56 
Kyle is correct - the actual contents of a text area id not treated as a template.

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/16/13 11:07 
Hi Guys, thanks for that.

Now how can i resolve this?

Basically i Have a custom Module and the actual module has inside a form which i create to be viewed on the front end. I managed to get tinymce. Is there any specifically i should do for the text box that i put the data in the include.php?

Back to top
Brian
Jamroom Team


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

Posted: 09/16/13 11:08 
What does your templates/item_embed.tpl look like?

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/16/13 11:18 
Don't have one Sad

Should i view an other module?

Back to top
Brian
Jamroom Team


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

Posted: 09/16/13 11:29 

adanhash:
Don't have one Sad

Should i view an other module?


Yes - if you want your item to be embeddable, you need an item_embed.tpl file. Checkout the audio or video module for examples.

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/24/13 20:52 
in the include

I copied the Jrvideo Embed code.

/**
* for the jrEmbed module to replace the tag [jrEmbed module="jrVideo" id="30"] with the actual player.


My embed tpl looks like this item :

<div style="display: inline-block;">
{jrCore_media_player module="jrVideo" field="video_file" item=$item}
</div>

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/24/13 21:04 
if you have a variable {$item.blog_text} that outputs as


Quote:
this is some blog text and here is a video [jrEmbed module="jrVideo" id="30"] did you like my video


then the jrEmbed module is not firing to replace what its supposed to replace.

so change {$item.blog_text} to {$item.blog_text|jrEmbed_embed} and the jrEmbed module will know to look for the tags and replace them.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/24/13 21:10 
ok its starting to read now the error im geting is

jrCore_media_player: invalid type parameter

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Help

 
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.