1
marcus73
Problem with form of news module
  • 2006/11/18 10:13

  • marcus73

  • Just popping in

  • Posts: 3

  • Since: 2006/11/18


Hello,
Excuse me for my english but i'm french !
I have installed the news module and I want that anonymous users post their news. But, I have 2 problems :
- The form is not the same for anonymous and registered users (for registered, there's for example extended text case more). Where do I change this to have the full form for all users ?
- Where do I can change the name of each case of the form ?

Thank you for your help and long life to XOOPS community !
Friendly
Marc

2
tripmon
Re: Problem with form of news module
  • 2006/11/18 10:33

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


That is odd... I can't see extended text area either, regardless of permissions I grant to anon.

3
tripmon
Re: Problem with form of news module
  • 2006/11/18 11:35

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


While Hervet would be the man to ask about this, I think I have a hack that will work for you... did it quick, so I don't know if there are other unknown issues (sanitize, etc.).

The only way I can see to get what you want is to:
1. Under Permissions, grant anonymous Submit, Approve & View.
2. In Preferences/Module Settings set: Auto approve news stories without admin intervention? No
3. edit include/storyform.inc.php
Change the red code below (line 87)
$editor=news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext1560'hometext_hidden');
$sform->addElement($editor,true);

//Extra info
//If admin -> if submit privilege
if ($approveprivilege) {
    [
color=CC0000]$editor2=news_getWysiwygForm(_AM_EXTEXT'bodytext'$bodytext1560'bodytext_hidden');
    
$sform->addElement($editor2,false);[/color]


To this:

$editor=news_getWysiwygForm(_NW_THESCOOP'hometext'$hometext1560'hometext_hidden');
$sform->addElement($editor,true);
[
color=CC0000]$editor2=news_getWysiwygForm(_AM_EXTEXT'bodytext'$bodytext1560'bodytext_hidden');
$sform->addElement($editor2,true);[/color]
//Extra info
//If admin -> if submit privilege
if ($approveprivilege) {


Note, we just moved it out of the if statement it was in & changed the false parameter to true.
You can change the other missing features the same way if you need them.

4
tripmon
Re: Problem with form of news module
  • 2006/11/20 7:59

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Hervet, if you manage to see this, do you have a comment on this issue?

5
marcus73
Re: Problem with form of news module
  • 2006/11/20 9:46

  • marcus73

  • Just popping in

  • Posts: 3

  • Since: 2006/11/18


Mumsy,
Thank's sincerely for your answer !
Everything is ok in the form but when anonymous submit a news, the extended text does not appear in the result !
http://contactezmoi.net/tonresto/modules/news/submit.php
When i'm log, everything is ok, and all the result appear !
secondly, how do I can modify the name of each case of the form ?
Friendly
Marc

6
thepaul
Re: Problem with form of news module
  • 2007/2/7 22:54

  • thepaul

  • Just popping in

  • Posts: 12

  • Since: 2006/6/20


I'm having a similar issue, since upgrading to News 1.5, when a Registered user enters text into the "Extended Text" box it is lost. Every other input box on the form seems to work fine, but this is a big pain. Can anyone offer some advice?

7
davidl2
Re: Problem with form of news module
  • 2007/2/7 23:05

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Have you tried the latest version here?

8
nachenko
Re: Problem with form of news module
  • 2007/2/8 10:28

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Same problem here, I fixed it this way: removing the "if" statement on "submit.inc.php". It's an odd behavior, and it's nonsense. Only approvers have the right to write extended text and write metadata? Why can anonymous users send titles and scoops but not extended text even if we allow them to send via permissions? What's the point on that?
Quote:
// if ($approveprivilege) {
$sform->addElement(new XoopsFormDhtmlTextArea( _AM_EXTEXT, 'bodytext', $bodytext, '25', '',''), false);

if(getmoduleoption('metadata')) {
$sform->addElement(new xoopsFormText(_NW_META_DESCRIPTION, 'description', 50, 255, $description), false);
$sform->addElement(new xoopsFormText(_NW_META_KEYWORDS, 'keywords', 50, 255, $keywords), false);
}
// }

Login

Who's Online

417 user(s) are online (274 user(s) are browsing Support Forums)


Members: 0


Guests: 417


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits