Members: 16,996
Threads: 38,845
Posts: 159,389
Online: 13

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 25.05.2005, 23:39   #1 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 5
dmso is on a distinguished road
Default module id

hey folks!

i am searching for ages now to find out how i can do the following. hope you can help me.

im writing a module and i want the module not to show the title, so i turned "show title" off in the backend. i want to have an own title, that is only shown when my module actually produces any content.

so i need to have the id of the actual module to get the title string from it (it stays the same as the original title but as explained above is only shown if output).

it is no problem when i have only one instance of my module, but when im running several instances (copy module in backend) it always fetches the title of the first module (my first sql was: select * from mos_module where module = 'mod_xyz')

so my question again: how do i find out the module id in a module php file?

thx,

dmso.
dmso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 26.05.2005, 03:14   #2 (permalink)
Senior Mamber
 
GRAM's Avatar
 
Join Date: Aug 2004
Location: Southern California
Posts: 131
GRAM has a spectacular aura about
Default Re: module id

You need to change what your SQL is searching for. Each time you copy your module, you should have a new module listing in the administrator backend under Modules/Site Modules. It still uses the same "Type" (your modules file name). There is a colum that lists each modules id. Try searching mos_modules WHERE id=(number from administrator) instead.


It would probably be better to use the id number that mambo gives you when it loads the module. It will be in an object available to the module (unique to each when it is loaded) called $module. You could access the id number and title from this object. $myTitle = $module->title; and myID = $module->id;

The code that creates and inititializes the module is in /includes/frontend.php . Look for the initModules() function.

It is displayed by the modules_html class contained in /includes/frontend.html.php . Look for the module2 function within that class.

The $module object is a mirror of the record in mos_modules for that specific module entry.
__________________
GRAM

Road Star Clinic / MLSHomeQuest.com
GRAM is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 26.05.2005, 17:57   #3 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 5
dmso is on a distinguished road
Default Re: module id

thank you very much, that was exactly i was looking for.

bye,
dmso
dmso is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
First web camera module for mambo 4.5.1 noobnuggets Development Announcements 4 13.11.2005 12:26
Putting content anywhere on the page - Module ready vrajesh Mambo 4.5 General Talk 7 28.09.2005 21:54
How do I install an Administrator module? funnycowboy Module 'How Do I' Questions 2 02.05.2005 02:29
Firefox search plugin installer module V2.0a! :) idigital Development Announcements 0 17.12.2004 13:38
Author Info module v1.0-Beta Released tonyskyday Development Announcements 0 27.07.2004 06:48


All times are GMT +2. The time now is 08:28.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.