1
woeps
How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 3:24

  • woeps

  • Just popping in

  • Posts: 8

  • Since: 2006/5/17


Hey everybody!

I just started to develope my first xoops-module (testing with XOOPS 2.0.13)..
And because I couldn't find a static-content-management module which fits my interests I decided to try to develope my own..

After a while thinking about it, i had to notice that I have hardly any idea how to put a link in the mainmenu which would be generated by a module..
To answer this question I think it would take more time than anyone else wants to spent on it so i sorted out my thoughts and here is my final question:

In which file is the content of the main-menu generated?

I think it should be in common.php but I really don't know.. so maybe someone of you can help me out here..

Thanks!!!
Woeps

P.S: Please, excuse my poor english!

2
mcleines
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 5:48

  • mcleines

  • Not too shy to talk

  • Posts: 108

  • Since: 2004/10/7


Search for Multimenu, this is the leading module for building menus.

Greetings from Osttirol.

3
stefan88
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 6:27

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


It is generated in xoops_version.php - the "menu" part.

Have a look here:http://dev.xoops.org/modules/phpwiki/index.php/ModVersion

..

4
wizanda
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 7:05

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Or do what I have done to learn, take some of the simplest modules, you can find, these will be funny, videos games, ect

Thats where I started I copied their Xoops_version.php...

you change the name the folder...

Add to the tops of the index.php

if in index of mod folder>> ../../mainfile.php
admin of mod folder>>../../..mainfile.php
Each one is a folder back
add header.php from XOOPS root

footer at the bottom and images

install

I made my searches blocks into its own module like this last night in an hour or so from the page source lol and echoed it in the index

http://www.wizanda.com/modules/searches

Have fun

5
woeps
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 8:40

  • woeps

  • Just popping in

  • Posts: 8

  • Since: 2006/5/17


Thanks for all those answers..!

Quote:

mcleines wrote:
Search for Multimenu

I have MultiMenu allready installed.. but this is not exactly what I'm searchin' for; 'cause as far as i know it just builds new "Menu-Boxes" (Blocks)..

Quote:

stefan88 wrote:
It is generated in xoops_version.php - the "menu" part.

Well, this was a good advice (I hadn't discouvered this "function" of the xoops_version.php yet ) Thanks!
but it's again not exactly what I'm looking for..
I want it to work like this: Install Module (No Link in the main-menu to this module) || Admin-Section: choose which files should get included(within the possibillity to upload files to an specified directory) in the "xoops-style" and which titles they should have in the main-menu.. these are my very first aims.. if i'll get this work; I thought of functions to generate also submenu-items etc. but at first i have to manage to get the most important functions work.

Quote:

wizanda wrote:
Or do what I have done to learn, take some of the simplest modules, you can find, these will be funny, videos games, ect

At the moment, i just read the code of other Modules and try to understand what this code is doing (of course I often just try to remove/change something and look what had changed)

So maybe you can help me once again with this specified question: If i run any index.php of XOOPS in a browser, usually there will be included mainfile.php(which includes common.php which includes many other files again) and header.php and after the current content will be included footer.php...

But where is the code which creates the menu, each time an when an index.php-file gets loaded?!?

Thanks,
Woeps

P.S.: I hope i could define what I mean..

6
wizanda
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 8:46

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Ok step by step step...
here lol, I will uploaded my own modules and you can see the simplest i have done

Searches I did yesterday

Download from here...

My XOOPS files

7
woeps
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 9:37

  • woeps

  • Just popping in

  • Posts: 8

  • Since: 2006/5/17


Well at the first sight I have to say: Your code is a bit chaotic..
What kind of editor did you use?

And now I'm proud to be able to give you an advice: Keep your code in clear Order..! (Then it's for you and everybody else who wants to read your code far easier to understand it..)

And now.. I'll "format" your code and then I'll read your code, again..

Greez,
Woeps

8
wizanda
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 9:56

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Yes of course it is... cheeeeeeky

I did that in 5mins, all I did is take what use to be a page full of blocks, the errors is mainly theirs even when they were blocks msn search the worst...
It was slow loading as it called the database to much....

So all you see there is a page source echoed in php directly, I haven't touched it, yet it views as a XOOPS page almost except on flowers....
And loads in half the time as there are no database calls for blocks....

Plus it calls it the name I have chosen as the folder so appering as wizanda has searches....

Make sense?

The editor I use has nothing to do with coding as some of the best coders use a notepad so...

Yet i use weaverslave, which is more convient then dreamweaver works along side top style lite for CSS both free, I use firefox with Tidy plugin and webdeveloper for CSS check and much more...

What do you use....?

9
woeps
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 10:27

  • woeps

  • Just popping in

  • Posts: 8

  • Since: 2006/5/17


Hmm.. You should ceep close the tags in order like you opened them.. try to check your code on w3c.org, then you will see all your "errors" you created; cause sometimes you closed or opened tags twice etc. . well but.. doesn't matters..

I can't see any sense in this "search-module" cause XOOPS is OO and the sense behind XOOPS is usually to have not static pages like this module.. but if it's for practice.. ok

BUT: for a so called "Module" like this you don't need to write it like a module.. it would be the same like you place a link in the main-menu (or somewhere else) to a php-file which includes the mainfil.php, header.php, then normal html-code, and again an include for footer.php.. this would be the same..
the only advantage i see in to write this like a module is that you don't have to place the link by your self in the main-menu, cause you can set this in the xoops_version.php..

I'm certain I'm able to write plane html & php code...
My challenge is to manage the OO php-code..and to fit the code into xoops..

Wow.. these were many words..

What I'm using:
Text(Code)-Editor: Crimson Editor (good Freeware)
Localhost(Server, PHP, mySQL): "EasyPHP-Package" which includes Apache PHP 4.3.10 and mySQL 4.1.9
Browsers: IE(I think V.5) and Mozilla Firefox with several Plugins like "CSS-Edit"..
Graphics: Fireworks 8

ok.. i think that's all..

Greez,
Woeps

10
wizanda
Re: How to put a link in the main-menu 'generated' by a module?
  • 2006/5/19 10:37

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21



That was an example.... if you can take a page source and stick it in XOOPS header and footer direct everything with the xoops_version and wham bamm....module!
ZBible on my site, which is a whole php script is done the same.
Yet with Admin also and colour selector...

As for W3C, Tidy is a branch of W3C and can run along with firefox as a notifcation of W3C errors and fixes....scary in XOOPS admin, easy fixes as well..

Login

Who's Online

192 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 192


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