Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 03:24:35 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.
155541 Posts in 21713 Topics by 7737 Members
Latest Member: simpleguy3
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: WYSIWYG and WB_URL fix  (Read 2067 times)
dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #25 on: September 18, 2011, 04:42:02 PM »

thx ivan, your solution works.
darkvipers patch is maybe safer for future.

@darkviper:
i think my changes was wrong in the save.php. but now it should be ok. is this right so?
Code:
<?php
// Update the mod_wysiwygs table with the contents
$MEDIA_URL WB_URL.MEDIA_DIRECTORY;
if(isset(
$_POST['content'.$section_id])) {
     
$content $_POST['content'.$section_id];
     
$searchfor '#(<.*= *\")('.quotemeta($MEDIA_URL).')(.*\".*>)#iU';
     
$content preg_replace($searchfor'$1{SYSVAR:MEDIA_REL}$3'$content);
     
$content $admin->add_slashes($content);
        
// searching in $text will be much easier this way
$text umlauts_to_entities(strip_tags($content), strtoupper(DEFAULT_CHARSET), 0);
$query "UPDATE ".TABLE_PREFIX."mod_wysiwyg SET content = '$content', text = '$text' WHERE section_id = '$section_id'";
$database->query($query);
}

« Last Edit: March 02, 2012, 08:29:47 AM by dbs » Logged

Pages: 1 [2]   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!