Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 12:39:11 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
149636 Posts in 21099 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: 1 [2] 3   Go Down
Print
Author Topic: New Module (Editable WYSIWYG module)  (Read 15684 times)
vizmotion

Offline Offline

Posts: 105


« Reply #25 on: July 20, 2007, 02:35:13 PM »

Hey Glogo,

The problem is with the new ability to turn on and off the edit, a new settings record is created along with the page. If you are doing this on an old version the new settings were not created. So it does not know what to do. Let me see what I can do to help.
Logged
vizmotion

Offline Offline

Posts: 105


« Reply #26 on: July 20, 2007, 02:51:52 PM »

Here is a fix for the upgrade problem I think. Try installing this new module. You should be able to install right on top of the old module. On all your WYSIWYG edit sections you will need to go into the settings part. This should correct the problem. Let me know how it goes.
Logged
glogo

Offline Offline

Posts: 22


« Reply #27 on: July 20, 2007, 03:08:27 PM »

okay well Robert,

we are still getting exactly the same error. First I reinstalled the .95, just to see if I had missed something. I went into the backend edit on the sections. There was nothing there. no settings. I thought maybe I had missed something.

then I installed the .96 over that. Still same error after reloading (I think maybe you added a table,  yes?) and there is no settings edit button or the like showing up in the backend. not on my server anyway. maybe we are using different versions of php? I think I'm using 5.

Greetings
glogo

ps: I am trying both adding pages and working with the old pages. all are telling me "fatal error" and pointing to line 53.
pps: actually, i was happy with the way the script was working after I had finally gotten it to work (vis a vis the logged in or not logged in question) but the problem I was running into was that it was not giving the revert, but keeping the last edit always. so, I don't know what you might have changed that would help with that situation. I am always happy to have "settings" button, tho.
« Last Edit: July 20, 2007, 03:14:03 PM by glogo » Logged
vizmotion

Offline Offline

Posts: 105


« Reply #28 on: July 20, 2007, 04:05:31 PM »

OK know what this problem is. You are right you need to create another table in the database like this:

CREATE TABLE `mod_wysiwyg_edit_settings` (
  `section_id` int(11) NOT NULL default '0',
  `page_id` int(11) NOT NULL default '0',
  `edit_logged_in` varchar(255) default NULL,
  PRIMARY KEY  (`section_id`)
)

I thought the install would create this table since it does not exists but that seems to happen only if you are reinstalling the module.

Once this is done it should work fine. Check out dev.vizmotion.com. That was just updated with the new module. Also I have enclosed another update of the module. Needed to fix another minor bug. I think this will do what you want once you make that database change. In the future you will just need to install it and it will work.
Logged
vizmotion

Offline Offline

Posts: 105


« Reply #29 on: July 20, 2007, 04:07:34 PM »

Oops forgot to add the update.
Logged
pcwacht
Guest
« Reply #30 on: July 20, 2007, 04:18:58 PM »

Erm vizmotion,

testing the page at your website I stumble upon the page reload, if reloaded a revert page it will create a new entry and a new and a ....

What about deleting old reverts? Maybe just a simple button next to the revrt button with exception of current used entry or somthing simular
Or a button delete old reverts.

Otherwise the database table might grow big


Loving it more and more...
If you need help, use the pm system


John
Logged
vizmotion

Offline Offline

Posts: 105


« Reply #31 on: July 20, 2007, 04:30:34 PM »

Hey John,

I know about the additional revert creation problem. That is because when you hit the back button it does a repost and runs the initial edit save again. Do you know how to not have it do a repost when you hit reload?

The idea about a delete button sounds interesting. Would you recommend on the back end or on the front end? I think on the backend would be better because then you can have people editing pages but not having the ability to delete revisions that they may need. If you are deleting revisions then you are managing that page so that is done in the back. What are your thoughts?

smiley Robert
Logged
glogo

Offline Offline

Posts: 22


« Reply #32 on: July 20, 2007, 04:57:05 PM »

@Robert,

ta-da! everything works, except there is still no settings button, means, I can't make the edit link disappear when I'm logged out. I am assuming there is some minor tweak needed to get that button.

I added the table into the data base. then everything started to work again. no more fatal errors.

I tried reloading the module. No go. Still no settings button.

undecided

Greetings
glogo
« Last Edit: July 20, 2007, 04:58:56 PM by glogo » Logged
pcwacht
Guest
« Reply #33 on: July 20, 2007, 05:18:47 PM »

@glogo
Did you look at the admin -> pages -> the wysiwyg page ?

Don't think the settings should be on frontend


@Robert,
The delete, maybe on frontend on a per user basis,
imagine following edits
1- user1 edits
2- user2 edits
3- user1 edits
4- user1 edits again and feel sorry

user 1 should only have the option to delete his 2 lasts posts
For this to work you need to store logged in user in the tables
Then in the revert list, since you show them from new to old,
show the delete-button untill the user from the reverttable changes from logged in user

Delete in backend could be handy for admin, delete all reverts but the last x
or auto delete when a post is older then x days

The offer to help remains btw Tongue

John
Logged
vizmotion

Offline Offline

Posts: 105


« Reply #34 on: July 20, 2007, 05:46:57 PM »

Hey John,

The delete seems to me to be a little more complicated than you described because of the ability for anyone (logged in or not) to be able to edit a page. You could probably achieve the effect you are describing by using cookies.

My thoughts about deleting is more about having some control over revisions growing out of hand and not that any one user should be able to delete. There may be a need to delete right when someone has made a revision but after that other revisions by other people could contain old information which could not be deleted. Just my two cents.

Thanks for the offer to help. Feel free to make any changes that you want. I put this up on the site to allow others to benefit from. By the way what is the pm system?

--- off topic ---
On a different note I have this idea about how to do documentation better for the different modules. Actually putting documentation on website baker website for each module then providing a help button that has the fields of ?module=modulename&version=version#. The page would then call the appropriate webpage. That webpage could be a wysiwyg edit page that is for the particular module. This is just the beginning of the module documentation notion. This would allow anyone to contribute to the module documentation. Where should I start that discussion?
Logged
glogo

Offline Offline

Posts: 22


« Reply #35 on: July 21, 2007, 01:56:17 AM »

@John, @Robert,

I am at the backend --> http://mysite.org/wb/admin/pages/modify.php?page_id=15#36.
no settings button.
http://mysite.org/wb/admin/pages/sections.php?page_id=15
no settings button.
front end, also, no settings button.

Like in the forms module. there is a settings button, where you input the email address etc.

nothing of the kind to be found. ok, I will work on my own version. it's an excuse to learn php, I guess. as good as any other.

thanks a bundle
glogo
« Last Edit: July 21, 2007, 01:58:01 AM by glogo » Logged
vizmotion

Offline Offline

Posts: 105


« Reply #36 on: July 21, 2007, 05:22:38 AM »

Hey Glogo,

You can try dev.vizmotion.com. The login is demo password is demo. Then edit the page there. At the top of the edit screen is an edit button and a setting button. Not sure what is going on with your system. Let me know if you don't see the setting button on the dev version. I just checked it again to make sure it was working. By the way what operating system and browser are you using?

smiley Robert
Logged
glogo

Offline Offline

Posts: 22


« Reply #37 on: July 21, 2007, 11:45:16 AM »

@Robert

I finally got it to work.*** The thing is,you really do have to uninstall the other version before this version will work. In my case I ended up losing all my work on that server. good thing I had it mirrored at another site. I am wondering if we should maybe somehow make it give an error instead of dropping all the tables that are there. Umm. Well, I did an unconventional thing, I know. I renamed the old folder and then I reinstalled the mod. So, it dropped all my tables. But anyway,I am happy to see that it's working. Now, I just want to make it default to setting the edit link only when you are logged in. I don't need any anonymous visitors editing anypages. Really, I could have done just as well with global settings. But this is okay, too.

thanks for all your concern and trouble taken. This will be a great module when it is honed. IMHO I think it should be kept rather simple. I don't know about all these delete buttons etc. Global settings will be good for plenty of users. If the site is being edited by only a few webmasters or admins, you don't need a lot of buttons and whistles etc.

Greetings

*** It's not working. The edit and settings link are showing. but if you edit, it does not save anything, neither in front or backend. Hmm.......

PS: My test server is windows running XAMPP. My real server is linux running apache. cannot get this mod to work on either of them as of yet, but I still hold out hopes!
« Last Edit: July 21, 2007, 12:08:49 PM by glogo » Logged
tomhung

Offline Offline

Posts: 353


« Reply #38 on: July 23, 2007, 10:12:35 PM »

ive been reading a bit about XSS.  i think opening page edits to the public is very dangerous.  this is because you allow LOTS of code injections opportunities with a textarea wysiwyg.  Just keep this in mind.... 

You will have to lock this WAY down if you want to offer this to the public. 

http://dev.vizmotion.com/modules/wysiwyg_edit/revisions.php?section_id=1&version_id=91&page_id=1&cmd=single

G
Logged
tomhung

Offline Offline

Posts: 353


« Reply #39 on: July 23, 2007, 10:26:19 PM »

plus your revisions are available offline. whoops


G
Logged
tavitar

Offline Offline

Posts: 9


« Reply #40 on: August 29, 2007, 01:31:15 PM »

This is a really neat module. Thanks vizmotion

I've made a few small adjustments (attached). Basically there's an extra option under the settings button to use the page permissions for changes. There's also edit & revision icons instead of text links.

David
Logged
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2093



WWW
« Reply #41 on: December 20, 2007, 03:44:39 PM »

I think this is a very good module. I am very happy with it.

Thanks to this thread I've got it working with FCKeditor. But...

When I use the frontend to edit a page with special characters (like á) it gets messed up when modifying the page. (those characters, including a  , are translated in a small square)
Using the backend everything goes fine.

I think  the problem lies with the line
Quote
$content = (htmlspecialchars($content['content']));
in the modify.php, but I could not find a way to change this and get it working on both front/backend

I don't want to tell my customer not to use any special characters, so any help on this would be appriciated.

Cheers,

Ruud
Logged

Professional WebsiteBaker Developer
vyni

Offline Offline

Posts: 566


« Reply #42 on: October 05, 2008, 03:28:27 PM »

Hi,

I tested this modul with the following result:

FCKEditor the small icons in the frontend disappears - nothing else - NOK
tinyMCE - section is opened in sourcecode - NOK
HTML-Area OK
Xinha OK

Did someone any modifying? Has someone a working FCK-Version?

regards from Himberg, next to Vienna

Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2093



WWW
« Reply #43 on: October 05, 2008, 09:52:49 PM »

Did someone any modifying? Has someone a working FCK-Version?

I have used it with FCK on many sites.
The problem is that FCK when unmodified tries to find the config in ../../config.php.
This works fine when used from the /admin/pages backend and even on some pages (first level) in the frontend, but not very wel in a frontend like /pages/level1/level2/level3.php
The solution is on the first few messages. The config is found using the WB_PATH variable.

TinyMCE didn't work for me too, but as a matter of fact I'm not using it anymore. I just explain the customer how the backend works. smiley
Therefore I never had a look to find out why it doesn't work.

Ruud
Logged

Professional WebsiteBaker Developer
vyni

Offline Offline

Posts: 566


« Reply #44 on: October 05, 2008, 10:33:00 PM »

 cheesy Jo, that was it!

Propably lost on last FCK-update.  grin

Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2093



WWW
« Reply #45 on: October 05, 2008, 10:35:11 PM »

Nope,

It never has been in FCK updates.
FCK is not made for this module, it is made for the WB backend.

Ruud
Logged

Professional WebsiteBaker Developer
vyni

Offline Offline

Posts: 566


« Reply #46 on: October 05, 2008, 11:14:15 PM »

So I did something wrong?

I followed this instructions.

Maybe You have a "permament" solution?

Regrards
Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2093



WWW
« Reply #47 on: October 06, 2008, 08:32:45 AM »

No, the solution is fine, only whenever there is a new FCK you must do it again.

Ruud
Logged

Professional WebsiteBaker Developer
vyni

Offline Offline

Posts: 566


« Reply #48 on: October 06, 2008, 12:55:55 PM »






 grin I discovered exactly this.
Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
chabar2000

Offline Offline

Posts: 152


« Reply #49 on: February 14, 2009, 04:45:42 PM »

I tested the module and it seems to work fine. Just a question: what is option button for? There is a blank page after clocling on it.

Thank you
Karl
Logged
Pages: 1 [2] 3   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!