images from wysiwyg editor

Use GitHub to post feature requests for phpwcms.
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

images from wysiwyg editor

Post by Fulvio Romanin »

hi oliver,
thanx for the FCKeditor which saves lots of time. I know you hate that, i don't . :)
On the editor, when you click on "insert image" you get prompted a url location to fill. Would it be impossible or hard to substitute that with the usual phpwcms image insert menu? that would save a lot of time and work ....

thx in advance
F
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Re: images from wysiwyg editor

Post by frold »

Fulvio Romanin wrote:hi oliver,
thanx for the FCKeditor which saves lots of time. I know you hate that, i don't . :)
On the editor, when you click on "insert image" you get prompted a url location to fill. Would it be impossible or hard to substitute that with the usual phpwcms image insert menu? that would save a lot of time and work ....

thx in advance
F
As a insider :wink: I know Oliver has thought about it, but you have to wait some weeks - as you know.. but he is thinking about it :wink:

But maybe you are able to make it?
http://www.studmed.dk Portal for doctors and medical students in Denmark
Shrike71
Posts: 14
Joined: Fri 28. Nov 2003, 16:26

image library images in the wysiwyg editor

Post by Shrike71 »

I'm working on this too.... watch this space next week

Regards,

Shrike71
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Re: image library images in the wysiwyg editor

Post by frold »

Shrike71 wrote:I'm working on this too.... watch this space next week

Regards,

Shrike71
Cool can wait to see it 8)
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

shrike is actually my hero :)

i'm no php coder, i'm mostly a flasher and i try to purify my soul from this horrible sin using phpwcms ;)

some time ago i talked with someone about doing a frontend interface in flash, but he said "he considered it" and disappeared....volunteers, anyone?

i'd just like to know how to pass the variables from php to flash...ok, i know about amfphp and stuff, but if someone could tell me how to pass, eg, the "content" variable, or the "image location" variable, it'd be a breeze to work it out...
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Re: image library images in the wysiwyg editor

Post by frold »

Shrike71 wrote:I'm working on this too.... watch this space next week

Regards,

Shrike71
any news... :D
http://www.studmed.dk Portal for doctors and medical students in Denmark
Shrike71
Posts: 14
Joined: Fri 28. Nov 2003, 16:26

internal images in wysiwyg editor .... update

Post by Shrike71 »

:?

Hi All,

Bit of an update.... i've trawled the mechanisms of the code and although browsing internal images is certainly possible, the intricacies of the various code bases (htmlarea & FCKEdit) have defeated me......

i've been trying to replicate the behaviour of the image browser as it works in the content part for "text w/image", trying also to include the folder/views and privileges per user, so that Oliver's ideas as to image ownership and availability remain intact.... but it's just too complicated for me in the limited timeframe that i have.

Unfortunately, my javascript is a trifle rusty, and i don't understand the commenting in German.... and i have no more time to spend on evaluating this. Anybody else care to try? I' can make my findings know to you if you wish to try .... and i think it IS a worthwhile feature to have.

Shrike71
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

/me encourages shrike to go on

come on! come on! come on! :) you can do it! come on! :)
Shrike71
Posts: 14
Joined: Fri 28. Nov 2003, 16:26

internal images in wysiwyg editor .... another update

Post by Shrike71 »

:idea:
OK...

For anybody who wants to know.... one of the major difficulties in implementing the internal image browser in the rich editor is the fact that a "virtual name" (the name that the image USED to be known as, eg. sitelogo.jpg ) is placed in the text field when inserting an image in the respective content part creation, this is for user-friendliness.

During the rendering of the page, a complex substitution process of the virtual name occurs and the REAL name is placed there instead, which would look something like 1_2_uGaT0P45bv-340x.jpg.

Since no substitution seems to take place when rendering rich content a solid understanding of the substitution mechanism is required (Oliver? help!) .... for which i haven't the time.

However, i'm changing tack.... this weekend i'm going to try and write a "Plug-in" that will use the equivalent SQL queries to extract the images, thumbnails and REAL names from the database according to the access control privileges, create a list which will display the thumbnails, and upon selecting the thumbnail, deposit the REAL name and relative path in the text field of the image selection box. If anybody has got any insights they might enlighten me with i'll be mighty grateful!

I will be testing this with htmlArea as it's a lot easier to work with, but once the plug-in is complete, it shouldn't be too difficult for some bright javascript spark to implement it in FCKeditor.

All, please bear in mind phpwcms will be front ending a very real intranet project (schedules, deadlines... all that bulls**t...), so if i can't get this mechanism working within a day or so, i'm just going to take a "tough!" stance with my users on the internal image browser, but anyone else will be welcome to my notes & code snippets if they're willing to carry on the good work!


Cheers,

Shrike71
Shrike71
Posts: 14
Joined: Fri 28. Nov 2003, 16:26

Another update!

Post by Shrike71 »

:D
Hi all,

I'm close to a solution that will allow you to post images (paste links, actually) from the uploaded file library into any rich editor that you want!

It might not be the best way of doing things and doesn't work quite in the same way as Oliver's browse_image.php works, with the folders and all, but it's quite a clever workaround, respects user access control for images (public/private and owned), checks to see if it can recycle any already used images and moreover, you shouldn't have to write a single line of code in any phpwcms script to implement it, as it's been designed as a sort of plug-in!

The example will show it working below the left article menu in phpwcms.php though.

Watch this space next week!

Cheers,

Shrike71
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

you are so great!!
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

we are waiting! good job shrike!

(i thought there was gonna be an official - even if minor - update too, am i wrong?)
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Sorry I would help - because I think I can. But I'm rare of time at the moment.

Image selections in image browsers are only based on the file ID. The name is copied for an easier understanding.

What I would create first is a simple image browser for the "picture" directory. That can be handled very fast. In a second I way I would build an optimized image browser where you can select the image you want to use, define the size -> then it will be converted if needed and inserted into the WYSIWIG editor. This is really easy. ;-) Cheers.


Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

this is still one of the most important items in my wishlist...any chance to fix that in the next release, oliver?

it's like having two different systems on the same cms...it's a pity we can't "link" them....

pleeeease... :lol:
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Actually I was searching for this post to - but couldn´t find it :oops:

I would really like that function and when it is added I think phpwcms is more or less complete (to support my needs :P )... !!

Any taking that challenge?
http://www.studmed.dk Portal for doctors and medical students in Denmark
Locked