1
npetreley
Re: ??? Stories Module, Replacement for News ??
  • 2004/1/30 22:10

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


Try 0.9.1 if you like. It now seems to coexist with News, except that if you use both alternately, the comments tracking (how many comments per story) will probably get out of sync, at least in the News module. Like I said, it was designed to replace the News module, not coexist with it, but now at least it won't overwrite any existing tables if you want to install both at the same time.



2
npetreley
Re: ??? Stories Module, Replacement for News ??
  • 2004/1/29 15:36

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


I forgot that topics already exists, too. I'll go thorugh and rename that, too - can't do it until later today or tomorrow, though. I didn't design the module to coexist side-by-side with the news module, but I can see why someone would want it to, so I'll fix that.



3
npetreley
Re: ??? Stories Module, Replacement for News ??
  • 2004/1/29 15:12

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


Okay, I updated the code to use a new table name "newstories".

I also provided a migrate script (migrate.php) that should copy the contents of your stories table into the newstories table, and create a TOCID (table of contents ID) for all the stories (which is needed for the way I allow admins to order the TOC any way they want).

It can't generate URLs or authors for the stories, since you enter those when you submit a new story and they don't exist as separate fields in the existing stories table.

Just re-download the file - it should have the new code in it now.



4
npetreley
Re: ??? Stories Module, Replacement for News ??
  • 2004/1/29 14:35

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


I was worried about that -- I purposely used the same stories table in order to make it easy to switch between the two modules. But I think it might be better to use a different table name, so I will go back and modify the module soon.

Meanwhile, you can see how it works by registering at www.varlinux.org and looking at the site as a logged-in user.



5
npetreley
Re: Help with Switching between Javascript and Html Menu
  • 2004/1/29 4:29

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


The Register menu link was there to begin with. Some browsers don't display the menu. Konquerer is one of them. It works for me in Opera, Mozilla, Netscape 6, and IE.



6
npetreley
Re: Help with Switching between Javascript and Html Menu
  • 2004/1/29 4:27

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


I hard coded it such as:

if ($xoopsUser) {
show these options...
}

But I only did it that way because it was expedient. I'm going to rewrite it based on permissions when I get the time.




7
npetreley
Re: Help with Switching between Javascript and Html Menu
  • 2004/1/28 21:30

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


I got HVMenu working on my site by inserting it all within the head section, and it has a lag on my site, too.

However, to really make it useful I had to modify header.php to include a program I wrote called topmenu.php, which generates the menu dynamically (so that users logged in get a different menu than someone who isn't logged in, and admins get a still different menu). Then it returns the javascript/etc code back to the theme as a <{$variable}> thingy.

Check out how it works on my site at VarLinux

IMO, the XOOPS team should put a generic "include generic.php" at the end of header.php, so that people don't have to modify XOOPS files in order to do this sort of thing. I don't know any other way to use PHP to dynamically generate something that gets put in the head section of the HTML page via the theme.



8
npetreley
VarLinux finally upgraded to Xoops2
  • 2004/1/14 21:16

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


Well, a modified version of Xoops2. I created a new module out of the news module (rather than change the existing one) and added a bunch of features. You need to be registered to see/use most of the new features. When I'm done debugging/tweaking it, I'll post it here as a module. Let me know what you think.

VarLinux.org

Features/changes:

1. The headline link on the index of stories takes you straight to the off-site story. If this is a story published only locally, it will take you to the comments/article.php page. Either way, the counter is incremented properly.

2. The stories on the home page are ordered by an added field in a linked table (the main "stories" table is not modified). This lets me rearrange the order of stories without affecting the storyid or the publish date.

3. If you are registered and any story has unread comments, you see red ***.

4. Added an IFRAME-based block that lists the latest XX number of stories with the most comments, in order of # of comments, descending. This shows people the most actively discussed stories. Again, if the story has unread comments, you'll see a red *.

This block also tells you the most read story today, the most commented story today, or if they are the same, it calls it the most popular story.

5. Added an "author" field (in linked table) so that you can view stories by an author.

6. Added a revised shoutbox (uses MySQL instead of a cache file).

7. Migrated my vlWeather module to Xoops2.



9
npetreley
Comment order code fix
  • 2003/12/17 22:56

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


In the comment_view.php file, the code correctly figures out what order to use to display the comments (newest first or oldest first) and puts the value in $com_order. But then it ignores the value of $com_order in favor of whatever may be in the URL, which is initially nothing, so it ALWAYS defaults to oldest first. Replace this line:

$com_dborder = ($HTTP_GET_VARS['com_order'] != XOOPS_COMMENT_OLD1ST) ? 'DESC' : 'ASC';

with this one to fix the problem...

$com_dborder = ($com_order != XOOPS_COMMENT_OLD1ST) ? 'DESC' : 'ASC';



10
npetreley
Re: Theme writing revisited
  • 2002/12/19 17:53

  • npetreley

  • Just popping in

  • Posts: 15

  • Since: 2002/12/9


I'd love to have a look at Xoops2. Is it available in anonymous CVS or anything? I apologize that I haven't looked for it yet, so if it's obvious where to get the code, just say so and I'll find it.




TopTop
(1) 2 »



Login

Who's Online

64 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 64


more...

Donat-O-Meter

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

Latest GitHub Commits