Author |
Message |
TAd
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/Garfield/Garfield_-_Garfield_2.gif)
Joined: Oct 11, 2004
Posts: 127
Location: Oregon, USA
|
Posted:
Wed Feb 23, 2005 10:35 pm |
|
One of the things that I have been searching for that seems to be missing with all the releases of PHP-Nuke is a a consistency through out the different areas. Of course I am using in comparison the PHBB forums as well. I do realize that this is an Add on, however the input is more geared towards the average web user. For instance:
A user wants to write a faq, and does so such as this:
Quote: |
How can I set up my D70 as a point and shoot?
Right out of the box, the Nikon D70 gives what I would call a flat recording response. Many functions are set to auto that a user may not be aware of. Here are some settings that may help you with your first images, and prevent some frustration.
Auto ISO : OFF
EV : +.3 to +.7 Generally .3 is good.
Auto WB : Set to -2 or -3
Hue : -3
Saturation : Enhanced
Tone Comp -1 (preserves detail)
Color Mode : Set as follows depending on your criteria.
sRGB (Color Space 1 & III) Used for Web and vieing.
aRGB (Color Space II) for images that are destined for Adobe Editing.
IIIa is a variation of sRGB III and provides for more vibrant Greens and Blues.
Ia is also a variation that reproduces skin tones well, used in potraits.
|
However, in order to do so the average user finds that the new statement looks like this because they did not use some HTML code.
Quote: |
How can I set up my D70 as a point and shoot? Right out of the box, the Nikon D70 gives what I would call a flat recording response. Many functions are set to auto that a user may not be aware of. Here are some settings that may help you with your first images, and prevent some frustration. Auto ISO : OFF EV : +.3 to +.7 Generally .3 is good. Auto WB : Set to -2 or -3 Hue : -3 Saturation : Enhanced Tone Comp -1 (preserves detail)Color Mode : Set as follows depending on your criteria. sRGB (Color Space 1 & III) Used for Web and vieing. aRGB (Color Space II) for images that are destined for Adobe Editing. IIIa is a variation of sRGB III and provides for more vibrant Greens and Blues.Ia is also a variation that reproduces skin tones well, used in potraits.
|
This same thing holds true for "content" but not for News. Except that in the News section you have an option at the bottom to submit, or preview and select the format whith which it is entered into the database.
The options are as follows:
Extrans
HTML
Text
How difficult would this be to implement into the content, sections,reviews, etc. portions of PHP-Nuke?
Thank you very much for any input!
Best regards,
Thomas |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Feb 23, 2005 10:48 pm |
|
Try this (use faq as the test). In admin/modules/adminfaq.php findCode:function FaqCatGoAdd($id_cat, $question, $answer) {
global $prefix, $dbi;
$question = stripslashes(FixQuotes($question));
$answer = stripslashes(FixQuotes($answer));
sql_query("insert into ".$prefix."_faqAnswer values (NULL, '$id_cat', '$question', '$answer')", $dbi);
Header("Location: admin.php?op=FaqCatGo&id_cat=$id_cat");
}
| and replace withCode:function FaqCatGoAdd($id_cat, $question, $answer) {
global $prefix, $dbi;
$question = stripslashes(FixQuotes($question));
$answer = nl2br(stripslashes(FixQuotes($answer)));
sql_query("insert into ".$prefix."_faqAnswer values (NULL, '$id_cat', '$question', '$answer')", $dbi);
Header("Location: admin.php?op=FaqCatGo&id_cat=$id_cat");
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TAd
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 12:35 am |
|
Raven wrote: | Try this (use faq as the test). In admin/modules/adminfaq.php findCode:function FaqCatGoAdd($id_cat, $question, $answer) {
global $prefix, $dbi;
$question = stripslashes(FixQuotes($question));
$answer = stripslashes(FixQuotes($answer));
sql_query("insert into ".$prefix."_faqAnswer values (NULL, '$id_cat', '$question', '$answer')", $dbi);
Header("Location: admin.php?op=FaqCatGo&id_cat=$id_cat");
}
| and replace withCode:function FaqCatGoAdd($id_cat, $question, $answer) {
global $prefix, $dbi;
$question = stripslashes(FixQuotes($question));
$answer = nl2br(stripslashes(FixQuotes($answer)));
sql_query("insert into ".$prefix."_faqAnswer values (NULL, '$id_cat', '$question', '$answer')", $dbi);
Header("Location: admin.php?op=FaqCatGo&id_cat=$id_cat");
}
| |
That was a fast reply! I just tried to locate the file adminfaq.php and was not successfull. I then updated to the latest release in your downlods section as well and am still unable to locate it. I did locate in the following directory:
nuke/modules/FAQ/admin/ the Index.php
that had that same line in it. I tried editing the code as posted above. After doing so, I was unable to "add" any new FAQ's. I thought it might be the the Breaks in HTML I had, so I edited those out as well and tried again. No luck on that go around.
Thank you very much for the help I appreciate it Raven
PS an observation, when you goto edit a FAQ it comes up just as you typed it, spaces an all, that would lead me to believe when you were "viewing" a posted FAQ that the format is convereted from text in the database, to HTML. Thus stripping all the spaces and cramming it all together. Not sure if I have explained this correctly or not. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 12:44 am |
|
In 7.6 it's in modules/FAQ/admin/index.php |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TAd
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 1:16 am |
|
OK editted the code like the above, and again when I click add, the new FAQ does not get entered. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 1:22 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TAd
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 1:25 am |
|
I have created an Admin account for you if you want to try it out. I will PM you the info and the URL
Also this is a fresh install and no modifications have been done to it.
Sending the PM now. Thank you Raven |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
TAd
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 24, 2005 10:03 am |
|
Raven,
Thank you very much! By introducing me to the nl2br function you lead me to a fix! Please see below
What would happen is I would input for the FAQ:
Test1
1
2
3
4
5
and get
Test1
12345
or
Test1
1
2
3
4
5
and get
Test1
12345
In the index.php located in modules/FAQ/
I replaced the following:
Code:Line 52 $answer = stripslashes($row['answer']);
|
with
Code:Line 52 $answer = nl2br(stripslashes($row['answer']));
|
and
Code:Line 70 $answer = stripslashes($row['answer']);
|
with
Code:Line 70 $answer = nl2br(stripslashes($row['answer']));
|
woohoo love php this morning : ) Thanks again Raven!
Best regards,
Tom
PS reverted to Original index.php in modules/FAQ/admin/
I did not make this modification to this particular file so as to keep the admin section uncluttered, however, when you edit the content of the FAQ, it brings the text back as input thus you are able to see the data as it would be viewed by users.
and woooohooo for the New Guy On The Block! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|