Jump to content

Recommended Posts

3 minutes ago, Heatherbell said:

Yes, we have it installed - het's goed zo

😂😂 

Thanks!

I thought so, because the admin is not yet bootstrapped.....

Share this post


Link to post
Share on other sites
11 minutes ago, Heatherbell said:

Sorry for my bad Nederlands

Probably translating "It's OK" to Dutch "Het's goed zo" is not bad.

I understand. "Het's goed zo" is usually interpreted like "It's OK" or "I'm OK with it" in a means of "I no longer wish to discuss..." 🙂

 

Just installed it, and it gives a much better response that my currenr bootsrapped Frozen admin (no offence to anyone).

 

 

 

Share this post


Link to post
Share on other sites
16 minutes ago, Heatherbell said:

Sorry for my bad Nederlands

Your Dutch is probably mch better than my Cornwallish.......... Hahahaha

Share this post


Link to post
Share on other sites

I wonder if it could be done with zero core code changes...

Possible ?


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

What is it actually used for (in real life)?  

  • product description
  • maybe category description?

anything else ?

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

I'm pretty sure it's possible with no core changes, in Phoenix. 

I think older versions of CE (and certainly all flavours of 2.3.4.1 and older) would need core code changes.

Who's going to have a go at a no core code change TinyMCE implementation ?


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Done a little bit of it.

Getting the code added to the admin.

Using the admin hook.

Just can't work out how to target specific textareas.(could only see name, no I'd or class)

Or would it be better to just include it in all textareas?


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

Try; 

textarea[name^="products_description"]

it may work, I dont know.  I use something similar in a different admin thing I built.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
2 hours ago, burt said:

I'm pretty sure it's possible with no core changes, in Phoenix. 

 

it is possible with all as long it contain an identifier like a class or ID, or as in your example the name element.
The problem with the name element is that you must list them all, so the editor fires.

a wysiwyg is most used:
- products descriptions.
- categories descriptions.
- manufacturers descriptions.
 

Addons what let you edit:
- privacy.php.
- shipping.php.
- conditions.php.
- * other information pages.


- ICECAT specialist.
(Icecat: open feed with product information, data-sheets for oscommerce.)
- CSV IMPORT specialist.
(manage your suppliers via supplier manager)
Contact me via PM.

Share this post


Link to post
Share on other sites
1 hour ago, puddlec said:

Or would it be better to just include it in all textareas?

No, that will ruin your SEO text fields.


- ICECAT specialist.
(Icecat: open feed with product information, data-sheets for oscommerce.)
- CSV IMPORT specialist.
(manage your suppliers via supplier manager)
Contact me via PM.

Share this post


Link to post
Share on other sites

just managed it.

it only loads on the selected textareas e.g. product description and category description.

if using multiple languages, you would need to make a small edit to the file to use tinymce with those languages. 

due to how the name of each field works ( it includes a number)

 


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

The code I posted should target all "product_description", regardless of the number in square brackets...


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
6 minutes ago, burt said:

The code I posted should target all "product_description", regardless of the number in square brackets...

got it working,

for some reason all the other config i used ' and on that line i used "


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

this is what i managed to achieve.  With my first attempt at using the hook system

i'll possibly tidy it up a bit on Sunday. and upload it as an addon

basically it just works just like the hooks on the shop side.

works on all category description, and product descriptions  textareas, regardless of how many languages you use.

in regards to the themes / plugins / toolbar you can just add / remove them as you see fit (the settings you see in the file are the ones i use myself)

it does with work the tinymce CDN (if you got an API KEY), loading locally, or via another CDN (using an CDNJS just to show it works),  you can use whatever source you want.

the same basic idea can also be used for ck editor, or any other javascript library you think you may need within the admin.

 

 

tinymce hook.zip

Edited by puddlec
Extra text

App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites
9 hours ago, kgtee said:

Ckeditor should be a better choice as it supports bootstrap tabs editing.

Ckeditor (or any other scripts) can be added into the admin using the same method that I used.

Not sure how ckeditor manages it but you can add in any external stylesheet into tinymce. Like I did with the bootstrap css

 


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

Excellent work @puddlec - loads of people will be very happy with this!

There is one small change I'd potentially make;  add in an array of good pages such like;

var $good_pages = ['categories.php', 'manufacturers.php'];

and then in the function, global $PHP_SELF and check it against the good_pages;

if (in_array(basename($PHP_SELF, $this->good_pages)) {
  ...
}

This will then load the scripts only on the pages that need them rather than on all pages.

And add textarea[name^="manufacturers_description"] to the selector (for manufacturer descriptions).

Note:  untested!

Edited by burt
cats -> mans

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
1 hour ago, burt said:

Excellent work @puddlec - loads of people will be very happy with this!

There is one small change I'd potentially make;  add in an array of good pages such like;


var $good_pages = ['categories.php', 'manufacturers.php'];

and then in the function, global $PHP_SELF and check it against the good_pages;


if (in_array(basename($PHP_SELF, $this->good_pages)) {
  ...
}

This will then load the scripts only on the pages that need them rather than on all pages.

And add textarea[name^="manufacturers_description"] to the selector (for manufacturer descriptions).

Note:  untested!

Thanks for that, I'll add it in.


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×