• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tinyBrowser plugin for tinyMCE headache

#1
[eluser]Unknown[/eluser]
Hi, got tinyMCE up and running easily enough - but the tinyBrowser plugin has stumped me.

It has always taken some tweeking to get it working on new sites - htaccess, absolute/relative paths, user file permissions etc.

But I'm at a dead end getting tinyBrowser to function in Code Igniter. I'ved searched the forum here and tinyBrowser/tinyMCE sites with no success.

First problem is the "You require permission to view this page." error that appears when trying to open up tinyBrowser.

From tinybrowser.php, I tried accessing the session details in the Code Igniter session class so I could name the session variable to check in config_tinybrowser.php , with no luck.

Next I commented out the session checking code which resulted in a blank tinyBrowser window.

I don't know if I'm looking at two different problems or just the one session problem.

I have an .htaccess file in the root, copied from the docs (ElliotHaughin) to remove the need for index.php in urls. Also there is an .htaccess file in the tinyBrowser directory that is needed for some servers. So I have tried removing them, adding them, one not the other etc. No luck.

I keep tinyMCE, along with CSS etc, in a folder named assets in the site root.

Any help appreciated. Also this is my first attempt at using Code Igniter, I have been coding php for about 1.5 years.

#2
[eluser]umefarooq[/eluser]
Hi im using tinybrowser for my all projects since last year, im not facing such a problems its really easy to use for every project and work really great, no need to use htaccess file for path setting for this you have to do some tinymce.init() settings

Code:
for absolute/relative paths
document_base_url: base_url,
relative_urls : false,
remove_script_host : false,

base_url you can define as javascript variable, if you want to set tinybrowser to use separate upload folder for each project

before using this install fresh tinymce and tinybrowser with any of you settings and try it

if have done some tinybrowser config settings here

Code:
//put this code top of tinybrowser_config.php file

$project_path = trim(str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']),'/');
$project_path = explode('/', $project_path, 2);
$project_folder = null;
if($project_path[0] !='application' || $project_path[0] !='application')
     $project_folder = $project_path[0];

after above changes find out down in config and replace with following code

$tinybrowser['docroot'] = rtrim($_SERVER['DOCUMENT_ROOT'],'/');
if($project_folder)
    $tinybrowser['docroot'] = $tinybrowser['docroot'].'/'.$project_folder;

this will work if project implement on root folder or in sub folder for testing, if you face any problem just shoot your message here

#3
[eluser]Unknown[/eluser]
Thanks for the help.

Umefarooq's code got the tinyBrowser window working.

For the "You require permission to view this page." error, I changed $_SESSION to $_COOKIE in tinybrowser.php on line 16 in the if(Session_id() != '') conditional that checks for a session. Did the same in edit.php, folders.php and upload.php. And then in config_tinybrowser.php on line 44, named the session variable to check 'ci_session'.

Then I had a folder write permission problem, was trying to sort it out and discovered tinyBrowser is no longer free anywayz.

So have changed to ckEditor with a free image upload plugin. It installed easily. So no more tinyBrowser headaches for me. Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.