1
SaddleBrooke
Adding Existing PHP/MySQL App to Main Menu?

I had previously developed an application (PHP/MySQL) for my Recipes, that I'd like to include on the Main Menu and have displayed on the main page.

Is there a way to call my /Recipes directory and include it, or do I need to develop my own module?

I've already looked at an existing user-developed module for recipes, but would much prefer to use my own app. Since I'm new to XOOPS, I dread the learning curve of setting up my own module?

Any advice or help appreciated.

2
ghia
Re: Adding Existing PHP/MySQL App to Main Menu?
  • 2009/10/29 23:49

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


- FAQ: adding links to the menu.
- You could also try to include your script in a blank module as eg Ghost.
- Writing a module tutorial from Kaotik.

3
SaddleBrooke
Re: Adding Existing PHP/MySQL App to Main Menu?

Thanks for the advice. I have 2 questions,

1. Please explain eg. ghost? The term "ghost" doesn't mean anthing to me. My recipes database and related features is not little. Can you clarify how I might go about doing the blank module, eg. "ghost".

2. Modifying the main menu won't allow me to control whether registered users can access ... or will it? I want to control access to my /Recipes and related PHP/MySQL application. Any suggestions.

I'm net to XOOPS and the module approach, but if that's the only approach that will control access to my application, then let me know.

4
SaddleBrooke
Re: Adding Existing PHP/MySQL App to Main Menu?

I edited my Main Menu to include my app, and it works well. However, there are 2 prolems or issues that I see ...

1. Replaces XOOPS, that is the app replaces my XOOPS appReplaces XOOPS, that is the app replaces my XOOPS app. Is there a way to bring up the app in a seperate window ... e.g., Target=_blank or even better to bring up the app inside the same window like the other regular items on the main menu.

2. Back Arrow is the only way to go back to my XOOPS Back Arrow is the only way to go back to my XOOPS, is there a way to have the XOOPS return automatically. I assume the only way to control this is to use the "Target=_Blank" approach.

Any thoughts or assistance appreciated.

5
ghia
Re: Adding Existing PHP/MySQL App to Main Menu?
  • 2009/10/30 9:28

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


In your menu you could use
<{if $xoops_isuser}>
 ...      
<{/if}>
but it will only be a one way security. The link is shown for registered users only. But if (non)users know the link, they could get there and use the script.
For returning to XOOPS, add a link in your scripts menu.

Ghost is a module and all security applies. It provides also the same page layout as the rest of the site, This means also that you must cut out the html header and footer parts from your script.


6
SaddleBrooke
Re: Adding Existing PHP/MySQL App to Main Menu?

Modified Main Menu, ... to include the "If User". This will do the job if nothing else. Really Nice!

I also downloaded and installed the Ghost Module, but I don't know what I'm doing. Is don't know what goes where ...

Is there any documentation or samples for Ghost. I tried searching, didn't find anything.

Incidentally, I did see some reference to Ghost 2. However, I couldn't find anything on Ghost 2 beyond the reference to it (Ghost 2). Any comments on Ghost 2

I also saw reference to a Phantom Module" during my searching ... The reference was in the French XOOPS support site. Any ideas about Phantom?

Thanks Again

7
ghia
Re: Adding Existing PHP/MySQL App to Main Menu?
  • 2009/10/30 18:10

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Fantôme is the French word for Ghost and is the same module.
You have to edit the index.php and add the HTML or PHP code on the designated place (after the comment).

The Ghost 2 module is in preparation and could be downloaded from svn, but is no longer available. It will support permissions, cloning etc. It did already work quite well.

8
SaddleBrooke
Re: Adding Existing PHP/MySQL App to Main Menu?

Thanks again,

I tried editing the index.html, but nothing showed. I expected the display to be the same as my old html (which includes a link for my Recipes database). I know I'm missing something?

Do I need to update the PHP file first? If so, I see that the existing PHP (index.php) has some guidelines.

Do I need to update the PHP file first, and if so, what do I put in my index.htm file (if anything).

I appreciate your assistance.

I tried the link for svn, but it's not working? I'm anxious to try ghost 2. Can u help>

Updated Comment: I copied my /Recipes contents to the Ghost directory and everything works well.

However, I don't see a place to limit access to Registered Users, Display in the Main Window, etc.
If these options are not available, then I'll go with the basic suggestion (modify the menu) and modify my /Recipes so that only Registered Users of my app can view/post, etc.

For General Information, there are some other options.

1. Modify the blocks that start up, and add the link for the database ... which would still require me changes to the PHP/MySQL app. This would NOT include the option to display for REGISTERED USERS only.
2. Use the CONTENTS module, with changes to PHP/MySQL option.

9
hackbrill
Re: Adding Existing PHP/MySQL App to Main Menu?
  • 2009/10/30 18:53

  • hackbrill

  • Friend of XOOPS

  • Posts: 283

  • Since: 2005/7/14


Ghia, can the ghost module be cloned?

Edit: I see that ghost2 can be cloned.

10
SaddleBrooke
Re: Adding Existing PHP/MySQL App to Main Menu?

Can u provide link for Ghost 2 Module?

Login

Who's Online

180 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 180


more...

Donat-O-Meter

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

Latest GitHub Commits