71
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



72
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???



73
rlankford
CBB 3.08 - RSS Channel Title Change (with code implementation)
  • 2007/4/12 19:00

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


This post echos one that I made at Xoopsforge.com.

I wanted to make the channel title a little more specific if the feed was limited to results from a single forum. If your users would like to see the title of the forum in their RSS feeds, then this might help you out too!



74
rlankford
Re: News 1.53: problems with WYSIWYG editor
  • 2007/3/28 12:41

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Please see this thread as it might be exactly what you are looking for.



75
rlankford
Local Search Block
  • 2007/3/26 20:45

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


This may be somewhere else, but I thought I would post this for anyone who might be interested:

Situation:
You're users want to be able to search on a module-by-module basis. But they don't like having to navigate to search.php and selecting the module first. Rather, they just want to search directly from within each module for content only within that module.

This can be accomplished with the following. Create a new block called "Local Search" that looks like this:

Resized Image

Now, plug the following code into the block:

global $xoopsModule, $xoopsConfig;
$currentModuleName = "Not in a module!";
$currentModuleID = 0;

if (isset($xoopsModule) and is_object($xoopsModule)) {
    if ($xoopsModule->getVar('hassearch')) {
        $currentModuleName = $xoopsModule->getVar('name');
        $currentModuleID = $xoopsModule->getVar('mid');
        
        ?>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr valign="bottom">
          <td align="center" width="20%">Search <?php echo $currentModuleName?>: </td>
        </tr>
        <tr>
          <td>
            <form style="margin-top: 0px;" action="<?php echo XOOPS_URL?>/search.php" method="get">
              <input style="margin-top: 5px;" type="text" name="query" size="20" />
              <input type="hidden" name="action" value="results" /><br />
              <span style="display: none"><input type='checkbox' name='mids[]' value='<?php echo $currentModuleID ?>' checked='checked' />module could go here, but we don't care</span>
              <input style="margin-top: 5px;" type="submit" value="Submit" />
            </form>
          </td>
        </tr>
        </table>
        <?php
    
} else {
        echo 
"Local Search Not Available.<br />";
    }
}


That's it! Now you'll get a "Local Search" block on every page. For pages inside a particular module, entering a search term will call search.php and limit it only to that module. On pages that aren't apart of any specific module, the user will just see a message indicating that the local search feature isn't currently available.

Enjoy!



Edit: After having thought about it for a few minutes, it would work better if I took into account the 'hasSearch' parameter in xoops_version.php for each of the modules. I've updated the code in this post to now account for this. So, now you'll get the "Local Search Not Available" message when clicking on modules that do not support search (like polls or contact us). My earlier code would try to support the search on any page that was in a module (vs. search.php -- which is not in any module). But now it'll at least ensure that the module supports search before jumping in!



76
rlankford
News 1.53 - New Config Option (with code implementation)
  • 2007/3/26 15:35

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


this morning, I ran across the fact that 'nohtml' was hard coded to true for user submitted articles. For some folks, giving users the ability to include HTML in their posts might be an OK thing to do -- so I turned this behavior into an config option instead.

You can read more about it here.



77
rlankford
Re: Which PHP editors are best?
  • 2007/3/23 16:41

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Yeah, I'm really really slow. But I finally just got around to taking a look at ZendStudio. It seems to work just fine so I've purchased a copy. So, for the first time in my couple of years with Xoops, I'm now literally able to use something other than notepad + echo for editing/debugging. I've also been boning up on my XOOPS api/php knowledge lately ... so watch out world!



78
rlankford
Re: CBB - Notifications Disappearing
  • 2007/3/23 16:35

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


Well, in case anybody ever stumbles across this...

I did finally figure out what was wrong -- and I'm embarrassed that I wasn't able to figure it out quicker than I did. Apparently, there were a few of my users who had altered their "Default Notification Mode" to say "Notify me only once" -- which I didn't even know existed!

So, no problems with any XOOPS code, it was actually a feature and not a bug.

Although, I gotta wonder why someone would ever want to enable that feature -- maybe a developer testing their notifications to see if they work?



79
rlankford
New Notifications for 2 Popular Modules (with code implementation)
  • 2007/3/23 13:00

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


I am posting this here on xoops.org for the benefit of the greater XOOPS community (who might not be watching these other forums).

I recently added some notification events to a couple of modules and have submitted the code it takes to implement them to the forums dedicated to their development:

1) WF-Downloads 3.1 (read more here)

2) News 1.53 (read more here)



80
rlankford
Re: an Ajax approach in xoops
  • 2007/3/12 17:23

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


I swear I'm not trying to be negative -- in fact I applaud your effort! But (you knew there was a but, didn't you) wouldn't an approach like this remove the ability for people to bookmark various pages on the site, or am I missing something?




TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 14 »



Login

Who's Online

153 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 153


more...

Donat-O-Meter

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

Latest GitHub Commits