[pLog-svn] resource addidtion problem solved !!

Jon Daley plogworld at jon.limedaley.com
Mon May 15 11:52:32 GMT 2006


On Mon, 15 May 2006, Oscar Renalias wrote:
> In fact, the article posted in the front page of lifetype.net advises
> people to use bugs.lifetype.net to report bugs related to 1.1.
 	What, you think I read the documentation???  :)

ma'moon: can you report both of these to bugs.lifetype (as separate 
issues)?  I think we should fix both, even though the first one is fixed 
in later versions of php anyway.

Our wizard should probably complain about the early 5.0 versions, to warn 
the user that they should upgrade php to avoid problems?


> Oscar
>
> On 5/15/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>>         Oscar - should people start posting bugs for 1.1 on bugs.lifetype?
>> I think it is time, and we don't want to lose track of these things that
>> are being reported.  I think I have some saved in my inbox from previous
>> reporters as well.
>> 
>> On Sun, 14 May 2006, ma'moon wrote:
>> 
>> > Dear guys,
>> > here is the solutions for the 2 problems that i have faced lately in
>> > lifetype 1.1 version, first i have to mention the problems and then you 
>> can
>> > find the solutions bellow :
>> > (1) the fatal error raised after a fresh installation process in file
>> > {*/class/summary/view/summarybloglistview.class.php} at line *89*.
>> > (2) editing posts that contains resources, the reasources cannot be shown 
>> in
>> > the editing area !.
>> >
>> > ** solutions:
>> >
>> > (1) the solution for the first problem doesn't actually have any
>> > relationship wether we have a fresh installation process or not, exactly 
>> as
>> > jon said, as a matter of fact it was a PHP core problem, if the version 
>> was
>> > *5.0* the line (89) in file
>> > {*/class/summary/view/summarybloglistview.class.php} wouldn't work 
>> because
>> > PHP 5.0 doesn't allow us to do it this way, instead, you have to assign 
>> the
>> > returned results from the function {$blogs->getAllBlogs( 
>> BLOG_STATUS_ACTIVE,
>> > ALL_BLOG_CATEGORIES, "", 1, 1)} to a $tmp variable and then you can use 
>> that
>> > "array" as an input parameter for the "array_pop" function, to solve 
>> this,
>> > you have 2 choices, first you can do it as i have discribed above or 
>> upgrade
>> > your PHP version to avoid this thing( as Reto says )  "I'am not sure if
>> > there was a thired option !!".
>> >
>> > (2) the problem scop for the second problem "as jon said !!!"  was the
>> > generated HTML code that the editor used to generat the desired display 
>> for
>> > the post, the reason behind this mis was in the file
>> > {*/class/view/admin/admineditpostview.class.php} at lines *53* and *54*,
>> > actually the function "preg_replace" that performs a regular expression
>> > search and replace wasn't actually working correctly because when the
>> > function reachs the first '&' in the phrase (&amp;) it will substitute 
>> the
>> > first character of the phrase by (&amp;) and leaves the rest of the 
>> phrase
>> > as it is since it doesn't match the search terms that is being provided 
>> to
>> > the function "preg_replace" which in its turn going to produce the phrase
>> > ($amp;amp;) !!!, now here the prblem raises because when we call the
>> > resource, the generated call statment would be something like {<img src="
>> > http://192.168.0.1/trunk/resserver.php?blogId=1&amp;amp;resource=17.jpg
>> > &amp;amp;mode=preview" border="0" alt="test" />} which is wrong !!!, to
>> > solve this problem i replaced lines *53* and *54* by the following lines 
>> :
>> >
>> > (53)$this->setValue( "postText", preg_replace('/@&(amp|#38);@i/', 
>> '&amp;',
>> > $this->_article->getIntroText()));
>> > (54)$this->setValue( "postExtendedText",
>> > 
>> preg_replace('/@&(amp|#38);@i/','&amp;',$this->_article->getExtendedText()));
>> > **NOTE: the older version of Lifetype also suffers from the same problem 
>> (
>> > the second one !!! ) and most probably its going to be solved the same 
>> way.
>> > this is what i have got after a long day of searching why is all that
>> > happening :))), anyway, i hope that what i have done was right and 
>> correct
>> > and goes with the rules :).
>> >
>> > thank you all again for this wonderfull Lifetype ;)
>> > Regards, Ma'moon
>> >
>> 
>> **************************************
>> Jon Daley
>> http://jon.limedaley.com/
>> 
>> Eagles may soar, but weasels don't get sucked into jet engines.
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>> 
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

**************************************
Jon Daley
http://jon.limedaley.com/

The cure for boredom is curiosity.  There is no cure for curiosity.
-- Ellen Parr


More information about the pLog-svn mailing list