mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:43

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ] 
Author Message
PostPosted: 21 Jul 2003, 16:25 
After updating from 0.50 to 0.6.0b9 the link for WYSIWYG HTML is NOT present.

Before updating i was able to use it but not link is present now (i've testede the configuration options).

I use Microsoft Internet Explore 6.


Report this post
Top
  
Reply with quote  
PostPosted: 23 Jul 2003, 12:33 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
> After updating from 0.50 to 0.6.0b9 the
> link for WYSIWYG HTML is NOT present.

Hi. Please enter to the administrative console and check that the following settings are enabled:
YES - Enable HTML code in the content of pages.
YES - Enable the HTML WYSIWYG editor.

(If you prefer to edit directly the cm/cm_config.inc.php file then look for cm_enable_htmledit and cm_enable_visedit, both should be set to 1).

The HTML code must be enabled both globally and for each page.

Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 23 Jul 2003, 15:12 
Both are activated but i get only a link about WikiMarkup

The other link about HTML Editor is not present since update.

:?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: 23 Jul 2003, 15:16 
i post the config file content (except user and password :-) )

version = "0.6.0b9";
superuser = "*****************";
mainroot = "******************";
remoteroot = 0;
show_rootinnav = 0;
enable_htmledit = 1;
enable_visedit = 1;
enable_platfonts = 1;
enable_cleanhtml = 1;
enable_verifylogo = 1;
historical_ratings = 1;
historical_comments = 1;
comments_chronorder = 1;
can_rerate = 0;
enable_gd = 1;
jpeg_truecolors = 0;
jpeg_quality = 75;
jpegprefix_file = "cmtn-";
jpeg_maxX = 125;
jpeg_maxY = 100;
album_cols = 3;
jpeg_prettynames = 1;
show_thumbsinlisting = 0;

dirs_inlisting = 0;
text_icons = 0;
home_maxleafs = 5;
home_minleafs = 0;
home_oldestleafallowed = 60;
max_statlist = 10;
max_usercomments = 25;
resethits_aftercomment = 1;
max_searchres = 10;
cm_icon_set = 3;
convert_emoticons = 1;
control_iconwidth = 16;
control_iconheight = 16;
setup_iconwidth = 32;
setup_iconheight = 32;
msg_iconwidth = 48;
msg_iconheight = 48;
emoticon_iconwidth = 16;
emoticon_iconheight = 16;
filelist_iconwidth = 36;
filelist_iconheight = 36;
dirlist_iconwidth = 16;
dirlist_iconheight = 16;
doclogo_width = 48;
doclogo_height = 48;

anything wrong??


Report this post
Top
  
Reply with quote  
PostPosted: 23 Jul 2003, 21:24 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Hi again.

Everything looks fine in your configuration file. The link to the WYSIWYG editor (the link before the Content edit area) is created by Javascript, and only if the ID of the browser sent to the web server looks like Mozilla or Internet Explorer.

So, my question is, what browser are you using and do you have javascript enabled? Also, some web proxies and some browser addons can change the browser identification.

If unsure (about the browser id), edit the cm_lib.inc.php file, around line 1571 (after the global and before the if) insert the following line:

echo "<br>$cm_http_useragent";

That will show you the browser ID (the User-Agent string) when editing a page. The PHP script looks for "MSIE" or "Gecko".

Hope this helps. Let me know what you find, so if this is a PHP or Javascript error I can fix it.


Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 28 Jul 2003, 02:27 
The echo line shows a BLANK-LINE (nothin is showed, only a new line)

I use explorer 6 and the cm 0.5 version worked fine.

function fcm_call_htmleditor ($cm_form_target, $cm_is_htmlenabled, $cm_direxist) {
global $cm_text, $cm_http_useragent;
echo "<br>$cm_http_useragent";
if (($cm_is_htmlenabled) && (eregi ("MSIE", $cm_http_useragent))) {
echo "<script><!--
function SendHTMLData() {

I've tried even modifying the AND MSIE condition.
If i remove that condition then the PHPROJEKT Content TAB is not available !

function fcm_call_htmleditor ($cm_form_target, $cm_is_htmlenabled, $cm_direxist) {
global $cm_text, $cm_http_useragent;
echo "<br>$cm_http_useragent";
if ($cm_is_htmlenabled) ) {
echo "<script><!--
function SendHTMLData() {


Report this post
Top
  
Reply with quote  
 Post subject: Note:
PostPosted: 28 Jul 2003, 06:35 
F.Y.I.
Note: I'm using I.E. Version: 6.0.2800.1106 - Everything is working. 8)
Just a note to help you guys in your trouble-shooting.
M.C.


Report this post
Top
  
Reply with quote  
 Post subject: Also....
PostPosted: 28 Jul 2003, 06:46 
Would the conditional statement introduced in I.E. 5 help?
Code:
<!--[if gte IE 5.5]>
<script> function SendHTMLData() {
<![endif]-->


Report this post
Top
  
Reply with quote  
 Post subject: Detecting the browser...
PostPosted: 28 Jul 2003, 12:10 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Hi again.

> The echo line shows a BLANK-LINE
> (nothin is showed, only a new line)

Ok, that is a problem, because it means the PHP code don't know the identity of the browser. (This detection is done server-side, not client-side).

> I use explorer 6 and the cm 0.5 version worked fine.

Did you changed or updated anything else? Maybe the web server configuration or PHP version or something else.

Try this:
Create a file named x.php (for example) with only the following lines:
<?php
phpinfo();
?>

Then load it in your browser. Check the following items:
section "HTTP Headers Information"
item: "User-Agent"

section "PHP Variables"
item: _SERVER["HTTP_USER_AGENT"]

Both items should contain something like "Mozilla/4.0 (compatible; MSIE 6.0; Windows)"


> I've tried even modifying the AND MSIE condition.
> If i remove that condition then the PHPROJEKT
> Content TAB is not available !
> ...if ($cm_is_htmlenabled) ) { ...

If the Content tab disappear after editing some code, it means the PHP script crashed. Check in the condition that there are the same number of opening parentheses than closing parentheses.
It shoud be something like:

if ($cm_is_htmlenabled) {

However, I think is better to find out why in your case the script cannot detect the browser.

Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: 29 Jul 2003, 15:21 
I've tried the PHPINFO in the admin module of content-manager.

It reports:


HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Any aditional test?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: 29 Jul 2003, 15:24 
also

_ENV["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: 29 Jul 2003, 15:28 
Nothing changed in server and if i restore a second PHPROJECT with the old content manager everithing works again, so its not a server problem ( i think ).

some aditional info:

PHP Version 4.1.2

System Linux linuxlab2 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
Build Date Mar 14 2002
Configure Command './configure' '--prefix=/' '--with-config-file-path=/lib' '--includedir=/usr/local' '--oldincludedir=/usr/local' '--infodir=/usr/local' '--mandir=/usr/local' '--enable-memory-limit' '--disable-debug' '--disable-posix' '--enable-url-fopen-wrapper' '--with-zlib' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-ttf=/usr' '--with-mysql=/usr' '--with-fastcgi=/usr/local/devkit_2.2.0' '--with-gd=/usr' '--with-db3' '--enable-bcmath' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local' '--with-recode=/usr/local' '--with-xml' '--enable-calendar' '--enable-trans-sid' '--enable-ftp' '--enable-track-vars' '--with-expat-dir=/usr' '--with-swf=/usr/local' '--enable-wddx' '--enable-xslt' '--with-xslt-sablot=/usr' '--with-ldap=/usr/local'
Server API FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /lib/php.ini
ZEND_DEBUG disabled
Thread Safety disabled


Report this post
Top
  
Reply with quote  
PostPosted: 29 Jul 2003, 18:46 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Hi again. This is the last test. I think I know what is the problem, but I need to be sure.

Edit the cm/display.php, adding the following code near the end of the file (just before the "echo $cm_html_footer" line):

Code:
echo "<br>HSV=" . $HTTP_SERVER_VARS["HTTP_USER_AGENT"];
echo "<br>SRV=" . $_SERVER["HTTP_USER_AGENT"];
echo "<br>ENV=" . $_ENV["HTTP_USER_AGENT"];
echo "<br>GEN=" . getenv("HTTP_USER_AGENT");



Now load any article (or the main page) of the CMS module and at the bottom there should be four lines. Could you tell me what lines return the correct string?

Thanks for taking the time to debug this. :)


Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 30 Jul 2003, 04:39 
Results

HSV=
SRV=
ENV=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
GEN=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)


Report this post
Top
  
Reply with quote  
 Post subject: Code patch...
PostPosted: 30 Jul 2003, 05:20 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Hi. The problem is that for some reason, the _SERVER and HTTP_SERVER_VARS variables are not set in your web server. (It could be the PHP version or configuration). This has been a problem too with the use of getenv and _ENV (in Windows servers) so I cannot rely on those two either.

Previous versions of the CMS module didn't rely on those variables. That's why you didn't have problems before.

This code patch tries to get the string by all four means.

Edit the cm/cm_lib.inc.php script file and delete the lines 85, 86 and 87 (those defining cm_http_useragent, cm_php_self and cm_server_name), then add these lines:

Code:
$cm_http_useragent = $_SERVER["HTTP_USER_AGENT"];
if (!$cm_http_useragent) {
  $cm_http_useragent = $HTTP_SERVER_VARS["HTTP_USER_AGENT"];
  if (!$cm_http_useragent) {
    $cm_http_useragent = $_ENV["HTTP_USER_AGENT"];
    if (!$cm_http_useragent) {
      $cm_http_useragent = getenv("HTTP_USER_AGENT");
    }
    else $cm_http_useragent = "";
  }
}
$cm_php_self = $_SERVER["PHP_SELF"];
if (!$cm_php_self) {
  $cm_php_self = $HTTP_SERVER_VARS["PHP_SELF"];
  if (!$cm_php_self) {
    $cm_php_self = $_ENV["PHP_SELF"];
    if (!$cm_php_self) {
      $cm_php_self = getenv("PHP_SELF");
    }
    else $cm_php_self = "";
  }
}
$cm_server_name = $_SERVER["SERVER_NAME"];
if (!$cm_server_name) {
  $cm_server_name = $HTTP_SERVER_VARS["SERVER_NAME"];
  if (!$cm_server_name) {
    $cm_server_name = $_ENV["SERVER_NAME"];
    if (!$cm_server_name) {
      $cm_server_name = getenv("SERVER_NAME");
    }
    else $cm_server_name = "";
  }
}



After this, the editor should work for you.

Regards,

Mario A. Valdez-Ramirez


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 30 Jul 2003, 10:41 
I DIDN't Work.

I've justa addesd at the end of your new code:

$cm_http_useragent = getenv("HTTP_USER_AGENT");

Then it works fine, so i think the nested if condition is not right tested (mayby the not is incorrect and you ned to compare nu blank, null, etc)


Report this post
Top
  
Reply with quote  
 Post subject: Bad patch...
PostPosted: 31 Jul 2003, 04:26 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Oooh. :(

Ok, I'll try harder. I'll have to replicate PHP environments again. I'll have a definitive solution in a couple of days.


Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 17 Jan 2005, 11:31 
Hello,

This is my first post. I just installed PHProjekt and seen in your mod a genious addon for peoples wanting to share and contribute on some documents. (Wiki Type)

I have tried to get the importnat WYSIWYG editor to work with every type of patch on the forum but still... no success :cry:

This is what I have down in my CM admin page:
C: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
S: CMS4P/0.6.0 Phprojekt/4.2 Apache/1.3.33 Mysql/unknown Linux


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group