Welcome, Guest. Please login or register.
March 20, 2010, 09:31:10 PM

Login with username, password and session length
Search:     Advanced search
WB 2.8.1 veröffentlicht!
Download und weitere Informationen gibt es hier .
110554 Posts in 15965 Topics by 9310 Members
Latest Member: stevenris10
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  Hello World Module
Pages: [1] 2 3 4 Go Down Print
Author Topic: Hello World Module  (Read 31686 times)
mightofnight

Offline Offline

Posts: 153


« on: September 08, 2005, 05:39:17 PM »

How to use!

ok i ran out of time for the directions and i will add more detail later, i promise Wink

but here goes.. let me know if i missed anything..


first files: add.php, delete.php, uninstall.php, index.php should not need to be modified.

I made all files load info.php so that they can get the mod name which solvs most of the problems in making a mod.  Otherwise changing the mod name would require changine it's name in probally at least 30 other spots..

Steps to making a mod..
1. edit info.php to your liking.. you can include any global vars that you might need in this file since it's included in all other files

2. Figure out what data you need to save and edit install.php.. look for the sql statement that should start on line 33.  this project only requires 1 variable so i have added this sql statement to add it's field. '`simple_output` VARCHAR(255) NOT NULL,'.  Most other projects will have many other data fields that need to be saved.. in this case i am only saving text that uset enters in a text box.

3. modify the modify.php file.. this is the file that is visiable in the admin section when the user is setting up the new page.

4. modify the save.php file this handels saving the fields from the modify.php file

5. modify the view.php file this handels the actuall output that the user sees..





Either dl attached mod or get it here:
http://mightofnight.com/forum/simple%20mod.zip

[attachment deleted because of being too old]
« Last Edit: September 26, 2005, 07:57:10 PM by mightofnight » Logged

-Travis
pcwacht
Guest
« Reply #1 on: September 08, 2005, 06:43:31 PM »

*Looks at documentation team ... Wink

Thanks this will be very handy for the new bakers.

John
Logged
Argos
Forum administrator
*****
Offline Offline

Posts: 1348


WWW
« Reply #2 on: September 08, 2005, 08:38:56 PM »

Eh.. what is a Hello World module??
Logged

Jurgen Nijhuis
Argos Media
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
mightofnight

Offline Offline

Posts: 153


« Reply #3 on: September 08, 2005, 11:03:19 PM »

http://www.mightofnight.com/pages/simple-mod.php  <--- example


it's a mod that is striped to it's smiplest form.  and in this case does one thing.. displays text entered in a text box..

its ment for someone who knows how to program but doesn't know whats needed to make a modual.. Wink

I plan on adding more comments and stuff if i get time in class Wink
« Last Edit: September 08, 2005, 11:21:49 PM by mightofnight » Logged

-Travis
Leigh

Offline Offline

Posts: 31


« Reply #4 on: September 09, 2005, 05:33:46 PM »

This is excellent. IT's the sort of thing I was looking for, and started playing with myself.  I think it should be called "Anatomy of a Module" and put into the documentation. Good job!!
Logged
coeus

Offline Offline

Posts: 4


« Reply #5 on: September 23, 2005, 03:39:49 AM »

How do I download this? When i click on the link it says:

"It seems that you are not allowed to download or view attachments on this board.
Please login below or register an account with Website Baker 2 Community Forum."
Logged
Woudloper
Guest
« Reply #6 on: September 23, 2005, 09:08:57 AM »

How do I download this? When i click on the link it says:

"It seems that you are not allowed to download or view attachments on this board.
Please login below or register an account with Website Baker 2 Community Forum."

You need to login and create an account. As I see you already did this to post this message, so you should be able to download this module now...
Logged
Woudloper
Guest
« Reply #7 on: September 23, 2005, 03:00:24 PM »

@ mightofnight: I was looking just today at this 'Hello World' module and I must say I like the idea very much.

Would it be possible to do a bit more explenation in the source of the different files and explain what the use is of a specific file? Furthermore I would like to know how a 'settings' page can be created. Are you able to explain a bit more about that.

And last, but not least. In the source of the 'hello world' module it seems to be that there are some refers to another module (gallery).
Logged
coeus

Offline Offline

Posts: 4


« Reply #8 on: September 24, 2005, 08:25:40 AM »

Quote
You need to login and create an account. As I see you already did this to post this message, so you should be able to download this module now...

No, I can't for some reason, that's why I posted. I registered for an account, logged in, clicked on the link, but got that error message. I did the a bunch of times, can't seem to download the file, can one of the mods check my permissions?
Logged
IrIT

Offline Offline

Posts: 1


« Reply #9 on: September 25, 2005, 03:22:07 PM »

Hmm, i can't download it either. I log in, but when i want to download it, it says that i have to login. And i'm suddenly not logged in anymore?
Logged
mightofnight

Offline Offline

Posts: 153


« Reply #10 on: September 26, 2005, 08:01:03 PM »

I put a hard coded link for the DL now..

as far as this comment..
"And last, but not least. In the source of the 'hello world' module it seems to be that there are some refers to another module (gallery)."

this is probally because i took the pickle mod and stripped it down and i must have forgotten a thing or two.. Yes i agree it does need some documetation but i barly fould the time to strip the mod.. i am taking classes working 50+hrs a week.  working on a side project for another company and speining time with my GF..

It's hard to start explaining what it does cause it quicly starts to turn into a programming show and tell.  It is assumed that you are somewhat famiular with php and mysql. 

« Last Edit: September 26, 2005, 08:11:14 PM by mightofnight » Logged

-Travis
Woudloper
Guest
« Reply #11 on: October 24, 2005, 02:16:27 PM »

A question about the 'hello world' module, since one part of the module is not completely clear to me. Can someone tell me the logic behind the 'query start', 'query body' and 'query end'?

As some of you might have seen I am working an the Flickr Image Gallery Module and that module shouldn't turn up on the search page. Can I then just remove these lines or are  they used for something else?
Logged
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #12 on: March 11, 2006, 07:45:26 AM »

Hello,

as i see more and more users use this modul to create their own moduls. But i found a bug wich causes that all modules wich are developped with this hello world modul breaks the search.

Have no time yet, to create a bugfixed version will do this in the next days. Problem seems to be in install.php the search entries needs ".galtitle" table wich isn't present in this modul. This entry is from pickle gallery.

Matthias

Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #13 on: March 20, 2006, 11:29:12 PM »

New Version of Hello World Modul

all modules wich are created based on the hello world module from above have the same errors as the hello world modul. This new version fixes (I hope) all this issues.

Changelog
  • Fixed - wrong search table entries
  • Fixed - search table are now deleted when modul is uninstalled
  • Fixed - deleted wrong code from pickle gallery in different files
  • Added -  some descriptions to better explain what happens in the different files
  • Added - supports now WB 2.6.x
  • Updated - all copyright notices include now 2006
  • Changed -  All Files stored Unix konform now

Hope you like it

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
kickarse

Offline Offline

Posts: 64


« Reply #14 on: March 21, 2006, 04:16:44 PM »

That's great! I've been working with the Paypal cart module and this will come in handy for making my own!
Logged
SHRIKEE

Offline Offline

Posts: 6


WWW
« Reply #15 on: March 26, 2006, 08:46:28 PM »

New Version of Hello World Modul

all modules wich are created based on the hello world module from above have the same errors as the hello world modul. This new version fixes (I hope) all this issues.

Changelog
  • Fixed - wrong search table entries
  • Fixed - search table are now deleted when modul is uninstalled
  • Fixed - deleted wrong code from pickle gallery in different files
  • Added -  some descriptions to better explain what happens in the different files
  • Added - supports now WB 2.6.x
  • Updated - all copyright notices include now 2006
  • Changed -  All Files stored Unix konform now

Hope you like it

Matthias

doesnt work for me.
when i try to install it i see no errors.
but it doesn show up anywhere not even in the database wb_addons Sad

i use wb2.6.2 on fc4 amd64
Logged

ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #16 on: March 27, 2006, 07:54:50 AM »

Hello,

hello it should be stored in the database addons as "simple". Also you can create a new page or a new section in a page with the "Simple Module".

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
SHRIKEE

Offline Offline

Posts: 6


WWW
« Reply #17 on: March 27, 2006, 07:10:26 PM »

Yea i figured as much,

but its not added to the addons table. the simple table is added.
Its no big deal tho, i figured out the plugin structure already and am working on one now.
I guess the file works for others...
Logged

Argos
Forum administrator
*****
Offline Offline

Posts: 1348


WWW
« Reply #18 on: March 28, 2006, 11:51:00 PM »

It installs correctly. No errors, and it can be seen on the server with FTP. But it doesn't show up in the admin, and thus cannot be used, nor uninstalled.
Logged

Jurgen Nijhuis
Argos Media
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #19 on: March 29, 2006, 12:13:41 AM »

Hello,

look a few posts above. Create a new page and choose 'simple module' instead of WYSIWYG.

If the modul is not in the dropdown list, wich version of WB did you use? And maybe you use a table prefix?.

Have tested the modul over and over again and it works here. So i don't know where the issue could be.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
Argos
Forum administrator
*****
Offline Offline

Posts: 1348


WWW
« Reply #20 on: March 29, 2006, 12:21:44 AM »

Hello,

look a few posts above. Create a new page and choose 'simple module' instead of WYSIWYG.

If the modul is not in the dropdown list, wich version of WB did you use? And maybe you use a table prefix?.

Have tested the modul over and over again and it works here. So i don't know where the issue could be.

Matthias

LOL, I know how to use a module smiley

It's not available in the module list after installation. I use version 2.6.0, and no table prefix. The module can be seen in the database as "mod_simple". So it seems it installed fine, apart from being invisible in the admin module list.
Logged

Jurgen Nijhuis
Argos Media
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
SHRIKEE

Offline Offline

Posts: 6


WWW
« Reply #21 on: March 29, 2006, 12:28:32 AM »

it didnt work for me cuz the files were already online from a previous install. when i remove them it works.
Logged

Argos
Forum administrator
*****
Offline Offline

Posts: 1348


WWW
« Reply #22 on: March 29, 2006, 12:32:49 AM »

Well, I cannot uninstall because it's not in the module list. And I cannot remove the files with FTP because I don't have the rights. Besides, I never installed it before. So that's no solution for me...
Logged

Jurgen Nijhuis
Argos Media
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
SHRIKEE

Offline Offline

Posts: 6


WWW
« Reply #23 on: March 29, 2006, 12:36:58 AM »

did you upload the files firsT? if so, remove them.
Logged

Argos
Forum administrator
*****
Offline Offline

Posts: 1348


WWW
« Reply #24 on: March 29, 2006, 12:45:19 AM »

No, I just installed it like any other module. If I had uploaded the files I would have been able to remove them as well, wouldn't I?
Logged

Jurgen Nijhuis
Argos Media
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [1] 2 3 4 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!