Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9005447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:08:50+00:00 2026-06-16T01:08:50+00:00

I have installed TinyMCE into my codeigniter build, and I have included the image

  • 0

I have installed TinyMCE into my codeigniter build, and I have included the image manager.

In the image manager plugin (which is saved in the public/assets folder) there is a php config file which defines the image & file path constants.

define('DIR_IMAGES', 'images/path/here'); etc

The problem I have is I need the path to be dynamic depending on some data in the database, such as template_name, but I dont know how to include the right files into the config file so I can view the dynamic info.

So if the user has a template_name saved then I need the path to be

define('DIR_IMAGES', $template_name.'images/path/here');

I have also defined the template_name in a constant in core/MY_Controller.php so if I could access that variable that would be easier than doing a query to the DB but either way will work.

Can someone give me a hand with this, thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:08:52+00:00Added an answer on June 16, 2026 at 1:08 am

    I’ve just custom tinymce image but not using TinyMCE image manager.

    but I use the tutorial from the link below.

    How-to implement a custom file browser

    <!-- Start tinymce custom -->
    <script type="text/javascript">
     tinyMCE.init({
    
      <!-- 
          your tiny mce init here 
       --->
    
    
       <!-- custom file browser callback -->
       file_browser_callback : 'myFileBrowser',
     });
    
    function myFileBrowser (field_name, url, type, win) {
      // this is your dynamic image path
      var cmsURL = "<?php echo base_url() ?>admin/media/select_image";  <== you can set as you wish
    if (cmsURL.indexOf("?") < 0) {
      //add the type as the only query parameter
      cmsURL = cmsURL + "?type=" + type;
       }
    else {
      //add the type as an additional query parameter
       // (PHP session ID is now included if there is one at all)
    cmsURL = cmsURL + "&type=" + type;
    }
    
       tinyMCE.activeEditor.windowManager.open({
    file : cmsURL
    ,width : 600
    ,height : 600
    ,resizable : "yes"
    ,inline : "yes"
    ,close_previous : "yes"
    ,popup_css : true // Disable TinyMCE's default popup CSS
    }, {
    window : win,
    input : field_name
    });
    return false;
    }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed TinyMCE and I have the textbox and the functions work(such as ,
I have installed VS2010 and MVC2 and testing a simple form using tinyMCE. When
I have installed ibrowser plugin. Do every thing in here and here Addin javascript
I have installed Android SDK(Build: v21.0.0-531062) in Windows7 . My AVD configuration is this
I have TinyMCE installed on the back end of a site. Some of the
I have installed zend server on my local system.I created one project folder using
Have installed Node version manager 'n'. Installed 'mocha' using n npm 0.6.4 install mocha
i have installed many third party plugin add-ins in my visual studio. now i
I have installed NSIS plugin in My eclipse on windows platform. I have java
I have installed the TinyMce blog editor to my site. When the compose blog

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.