1
trspice
News Module - User submission Bugs
  • 2007/4/13 17:40

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


When a user submits, only 'The Scoop' form is displayed. This causes the entire article to display as summary. The article has to be edited then the 'Extended Text' area and the 'scoop' are properly displayed.

Has anyone done a hack to make this work right on initial submission?

- I enabled TinyEditor in the preferences and when articles are published, the HTML code shows. There is no check box for the user to enable HTML. Then as admin when I edit the article and then enable HTML nothing change. I have to delete the article and repost for the enabled HTML to work.

If editor options are provided what else must be done to make it display without the codes.

- On editing any article the display date is checked by default and if not uncheked then it doesn't display and when I try to edit and change that it won't correct. I have to delete and repost. It's like it can't edit the database

Has others experienced these bugs? What is the fix for this?
There's nothing but science....
The Reggae Album

2
rlankford
Re: News Module - User submission Bugs
  • 2007/4/13 19:55

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Ah yes. These idiosyncrasies are pare of what make us love News so much!

I believe the problem with the extended text is that the code only shows this to administrators. To fix this (in version 1.53), comment out lines 93 and 101 in

include\storyform.inc.php

It should now look something like this:

//Extra info
//If admin -> if submit privilege
//if ($approveprivilege) {  //Commented out by Lankford on 2007/4/13
    
$editor2=news_getWysiwygForm(_AM_EXTEXT'bodytext'$bodytext1560'bodytext_hidden');
    
$sform->addElement($editor2,false);

    if(
news_getmoduleoption('metadata')) {
        
$sform->addElement(new xoopsFormText(_NW_META_DESCRIPTION'description'50255$description), false);
        
$sform->addElement(new xoopsFormText(_NW_META_KEYWORDS'keywords'50255$keywords), false);
    }
//}        //Commented out by Lankford on 2007/4/13


You'll now see both entry forms every time.

As far as the other bug goes, it looks as though this may be a 'feature not a bug' kind of thing. In that same file on line 153 you see that the box gets checked if there is a publish date present. The publish date seems to go in 10 minute increments. Because of this, you can post a document, immediately edit that document and watch it disappear as the publish date got automatically rounded up to the next 10 minute increment, which is still in the future. This isn't a fix but I personally just keep it in my head that I have to manually roll this number back 10 or 20 minutes to ensure that my post is immediately visible on the seldom occasion when this comes up.

Anyone know of a bug fix to this???

3
trspice
Re: News Module - User submission Bugs
  • 2007/4/13 22:02

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Thanks Lankford. that did display the second textarea. Another main fix is displaying the 'Allow HTML' checkbox for users. Without that it keeps returning codes within the articles.

I saw some other lines in that file and tried blocking them out but that didn't display the checkbox. Have you figured that out also?

Update:
I tried to use the extended text and it published without error but the 'Read More' link does not show in the summary.

Also I commented out the IF lines for $option_tray and now all the check boxes display for users but checking them does nothing as the HTML codes still show.
There's nothing but science....
The Reggae Album

4
rlankford
Re: News Module - User submission Bugs
  • 2007/4/14 23:36

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Quote:

Have you figured that out also?


Yeah, maybe. This might not be exactly what you're looking for, but you might find it's just what you're looking for:

link

5
rlankford
Re: News Module - User submission Bugs
  • 2007/4/14 23:43

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Quote:

This might not be exactly what you're looking for, but you might find it's just what you're looking for:




That's what happens when you write the second half of your sentence 5 minutes after you write the first half! No more interruptions for me!

6
trspice
Re: News Module - User submission Bugs
  • 2007/4/15 3:52

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Thanks. That fixed the HTML problem but the extended text form still won't work. There must be more going on in its core. It is acting really retarded like it wasn't complete but just thrown out to meet a deadline.

With the original storyform.inc.php the extended text area shows when a user clicks edit of the article they post. They enter text in it and then click submit and before the form is sent you literally see the text in the extended area stripped away. It doesn't display in the published article.

Is anyone willing to correct these bugs for a fee?
There's nothing but science....
The Reggae Album

7
rlankford
Re: News Module - User submission Bugs
  • 2007/4/15 21:12

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


trspice,

It's odd that you would be having so many problems with this. On my local computer, I have the following set up:

- XOOPS 2.0.16
- News 1.53 (with the HTML Config Option applied)
- PHP 5.2.0

With this set up (I only have news and the latest cbb installed), I don't experience the problem that you apparently are having with the extended text:

Resized Image

Notice in the image above that rlankford (not an admin) is logged in and has posted an article with extended text present (hence, the availability of the 'read more' link). When I click 'read more', I get this:

Resized Image

You can see the extended text. You can also see that it has been altered. This was done with the rlankford account with no problems.

I don't know what's going on. Is it possible that you've been thrashing about in the news files and have caused a problem?? Maybe staring over with fresh News 1.53 code might help??

Best of luck...

8
trspice
Re: News Module - User submission Bugs
  • 2007/4/16 18:43

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I restored the storyform.inc.php to the original and then applied the mods you suggested and the extended textarea shows but still won't record an entry.

See image
Resized Image

Note the first article posted by 'anna' has no read more even though text was added to the extended area

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

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


Nothing else has been changed in this file.

Xoops 2.0.16
Linux
php 4.4
mysql 4.0
There's nothing but science....
The Reggae Album

9
rlankford
Re: News Module - User submission Bugs
  • 2007/4/22 16:52

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Sorry it's taken me so long to get back to you.

I think, in order to solve this problem once and for all, we need to take a sledgehammer approach :)

This may be overkill for you, but it should open up all the features of the module to your article submitters.

On line 66 of submit.php, change 0 to 1. It should now look like this:

$approveprivilege 1;


Please note that this basically overrides any filtering that gets done. Your article submiters will be able to directly approve their stories...whatever the content. You might, however, implicitly trust them. In that case, this wouldn't be a problem.

The 'real' solution for you is one of the following:

a) live with the fact that the author of the module didn't intend extended text to be usable by general site users.

b) pour over the code in submit.php and move anything related to the extended text field outside of the 'if $approveprivelege' blocks. To find this stuff, you want to look for 'bodytext'.

I'm not really sure why the extended text was limited in this way ... but that's what available.

Hope this helps!

Login

Who's Online

284 user(s) are online (191 user(s) are browsing Support Forums)


Members: 0


Guests: 284


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