1
geuis
Re: Not sure how to customize modules and blocks
  • 2004/9/10 11:00

  • geuis

  • Just popping in

  • Posts: 4

  • Since: 2004/9/10


I think some people might find this interesting. A little hack I'm halfway through doing.

I figured out how to modify the Sections module to do what I want. The main problem I had with this module initially is that it does not simply display articles as sub-menus and then load those articles onto the page.
I've figured out how to add the sub-menus, and how to get it to display the article directly by clicking on the submenu.

Its a complex process right now, but here it is. Still working on it so I'll be sure to update:

TO CHANGE THE SECTIONS MODULE:
1) add new menu options:
Goto modules/sections/xoops_version.php, edit this file.
Under //Menu, add
$modversion['sub'][1]['name'] = "The New Menu Item";
$modversion['sub'][1]['url'] = "url of the menu item";
Save this.

2) add the content that the menu option loads:
Log into the site as admin. Go to System Admin, then Modules.
Click on the Sections button to add new content.
If a section does not currently exist, add a new one.
Then create a new article with the same title as your menu option. Add your content also. Save.
If you need to edit any existing articles, scroll down the page to "Last 20 Articles". Click on Edit next to the one

you need to change.

3) link the menu option to the content page.
Go to the main page of the site. Click on Sections.
Click on the Section in the middle of the screen that you previously setup.
Click on the article you want to link to the menu option.
On the new page that loads, at the bottom copy the link under "The URL for this story is". Click on the link.
Goto modules/sections/xoops_version.php, edit this file.
Under //Menu, modify the menu option code you added earlier.
From the link you copied, only copy the end of the link beginning with index.php?op.....
Paste this into the section that says "url of the menu item"
For example:
$modversion['sub'][1]['name'] = "The New Menu Item";
$modversion['sub'][1]['url'] = "url of the menu item";
changes to:
$modversion['sub'][1]['name'] = "The New Menu Item";
$modversion['sub'][1]['url'] = "index.php?op=viewarticle&artid=2";
Now save this file.

4) review the changes:
Go to the main page of your site.
Click on Sections, then click on the sub-menu you created. It should display the article you created.




2
geuis
Not sure how to customize modules and blocks
  • 2004/9/10 9:26

  • geuis

  • Just popping in

  • Posts: 4

  • Since: 2004/9/10


I am just getting started with XOOPS and so far I think its great. I do have a couple of questions though.

I have reviewed all of the included modules and have installed the ones that work well for me as they are. These are the News, Downloads, and FAQ modules.

What I want to do is have the Main Menu block setup like this:
News
Downloads
FAQ
About
What is this site about?
Project Goals
How to join.

What I want is this; when the yet-to-exist module About is clicked on, under the Main Menu block it will show the 3 sub-menus What is this site about?, Project Goals, and How to Join.
Then when the user clicks on any of the sub-menus, a short article is loaded in the middle of the page.

I cannot seem to find a way to setup any kind of module to act like the fake About module in my example.

So, for some questions:
1) How do I edit existing modules to do what I need?
2) What is necessary to create a new module from scratch?
3) Are there any modules I can load that will let me create other modules from inside Xoops?
4) Once I create a Block, how do I get a module to be loaded in that block instead of the Main Menu block?

I appreciate any bits of wisdom *anyone* can drop my way. Thanks!



3
geuis
Re: Locked myself out of being able to log into website
  • 2004/9/10 2:33

  • geuis

  • Just popping in

  • Posts: 4

  • Since: 2004/9/10


Works wonderfully. Thanks a lot.



4
geuis
Locked myself out of being able to log into website
  • 2004/9/10 2:15

  • geuis

  • Just popping in

  • Posts: 4

  • Since: 2004/9/10


I wanted to make my site so that logins were not required. I disabled the login function for anonymous users. Hurrah, that works great.
Then, after closing the browser I was working in, I realized that now I don't have any way to log into the site as administrator to make changes.
In effect, I locked myself out of my website.

How can I re-enable logins for anonymous users without having to completely reinstall the entire site?




TopTop



Login

Who's Online

207 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 207


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