21
ChadK
Re: cookbook recipe maker
  • 2004/9/21 18:21

  • ChadK

  • Quite a regular

  • Posts: 242

  • Since: 2004/7/9 1


It seems to me that this could be made into a module quite easily by just modifying the custom_inc.php file and adding:
require_once("../../mainfile.php");
require_once("../../header.php");
at the top.. then substituting XOOPS variables for the following:
Quote:

global $g_rb_debug;
$g_rb_debug=FALSE; // prints out all the sql calls

// Pick the theme for the site
global $g_rb_theme,$g_rb_theme_hoverin, $g_rb_theme_hoverout;
$g_rb_theme="default";

##################################
## Directory Settings ##
##################################

global $g_sm_dir, $g_sm_url, $g_sm_adodb, $g_rb_basedir, $g_rb_baseurl,
$g_sm_adodb;
$g_rb_basedir = $_SERVER['PATH_TRANSLATED']; //"/var/www/html/dev/src/";
$g_rb_basedir = str_replace("index.php", "", $g_rb_basedir);
$g_rb_baseurl = $_SERVER['REQUEST_URI']; //"/dev/src/";
$g_rb_baseurl = str_replace("index.php", "", $g_rb_baseurl);
$g_sm_dir = $g_rb_basedir . "libs/phpsm/";
$g_sm_url = $g_rb_baseurl . "libs/phpsm/";
$g_sm_adodb = $g_rb_basedir . "libs/adodb/adodb.inc.php";

##################################
## Database Connection options ##
##################################
/*
Select one type: mysql,postgres,oracle..
see adodb readme files for more options
*/
global $g_rb_database_type, $g_rb_database_host, $g_rb_database_name, $g_rb_database_user, $g_rb_database_password;

$g_rb_database_type = "mysql";


//Set from Xoops
// Example PostgreSQL Settings
$g_rb_database_host = "localhost:5432";
$g_rb_database_name = "webdb2";
$g_rb_database_user = "postgres";
$g_rb_database_password = "";

##################################################
## Security Options: ##
## These options will effect the login system ##
##################################################

// Debuging, this is useful to turn on if you are getting a general error
global $g_sm_debug, $g_sm_session_id;
$g_sm_debug=$g_rb_debug;

$g_sm_session_id="SMSessionID";

global $g_sm_open_reg, $g_sm_enable_sec, $g_sm_default_access_level,
$g_sm_autologin_user, $g_sm_autologin_passwd, $g_sm_user_privilages,
$g_sm_admin_email, $g_sm_send_crlf, $g_sm_cleanup_files,
$g_sm_superuser_level, $g_sm_access_array, $g_sm_supported_languages,
$g_sm_supported_countries;


/* // Access Levels, do not change these unless you are familiar with the code
$g_sm_access_array = array(
//Anonymous "READER" => 0 ,
//Registered "AUTHOR" => 30 ,
//Moderator "EDITOR" => 60 ,
//Administrator "ADMINISTRATOR" => 90
);*/


$g_sm_open_reg=FALSE; // allow anyone to register as a new user
$g_sm_enable_sec=TRUE; // turn on/off the login system
$g_sm_newuser_access_level=30; // set the default security level of a user registering on their own
$g_sm_superuser_level="ADMINISTRATOR"; // The access level that denotes super users/admins
$g_sm_newuser_set_password=TRUE; // This determines if new users can set their passwords, or if it is emailed to them

//Set to admin email
$g_sm_admin_email = "manager@phprecipebook.com"; // set the system email address
$g_sm_admin_name = "PHPRecipeBook Manager"; // name of admin in emails
$g_sm_email_hosts = "mailserver.phprecipebook.com"; // set the smtp hosts to use for mailing (you could use sendmail if you wanted).

/*
If security is disabled, then make sure the following
two settings point to a valid user with at least Author access level (Admin would be best)
*/
$g_sm_autologin_user="admin"; // The username to automatically login as
$g_sm_autologin_passwd="passwd"; // The password to login with

global $g_rb_enable_ratings, $g_rb_show_ratings;
$g_rb_enable_ratings = TRUE; // Enable or disable the recipe ratings
$g_rb_show_ratings = FALSE; // Show the reviews/ratings on the recipe pages

#######################################
## Language: ##
## this will set a default language ##
## for guests. ##
#######################################
global $g_rb_language;
$g_rb_language = "en";
// this is a fall back settings, first the user's preferences and browser settings will be checked.

########################################
## Misc Options ##
########################################
global $g_rb_pagerLimit;
$g_rb_pagerLimit=25; // The number of recipes/ingredients to show per page

########################################
## Constants ##
########################################
global $g_rb_max_picture_size, $g_rb_project_name, $g_rb_project_version, $g_rb_project_website;
$g_rb_max_picture_size = "2000000"; // this sets the max upload size of a picture
$g_rb_project_name = "PHPRecipeBook";
$g_rb_project_version = "2.24"; // well not quite constant, but oh well.
$g_rb_project_website ="phprecipebook.sourceforge.net";


// ---------------------------------------//


?? right?
Then of course, create a xoops_version.php and toss in the appropriate SQL script location so it creates the tables and add the table bit to the xoops_version.php as both the XOOPS compatible variables and the phprecipe module variables?
Quote:
########################################
## The table names ##
## You can change the table names ##
## and prefixes, if you do though ##
## make sure you change the names ##
## in the database as well ##
########################################
global $db_prefix;
$db_prefix = "recipe_"; // change this to change just the prefix, useful for databases with more than one app in them
global $db_table_ethnicity,$db_table_units,$db_table_locations,$db_table_bases,$db_table_prep_time,
$db_table_courses,$db_table_difficulty,$db_table_ingredients,$db_table_users,
$db_table_recipes,$db_table_list_names,$db_table_list_recipes,$db_table_list_ingredients,
$db_table_related_recipes,$db_table_favorites, $db_table_ratings, $db_table_reviews;
$db_table_settings = $db_prefix . "settings";
$db_table_users = "security_users";
$db_table_ethnicity = $db_prefix . "ethnicity";
$db_table_units = $db_prefix . "units";
$db_table_locations = $db_prefix . "locations";
$db_table_bases = $db_prefix . "bases";
$db_table_prep_time = $db_prefix . "prep_time";
$db_table_courses = $db_prefix . "courses";
$db_table_difficulty = $db_prefix . "difficulty";
$db_table_ingredients = $db_prefix . "ingredients";
$db_table_ingredientmaps = $db_prefix . "ingredient_mapping";
$db_table_recipes = $db_prefix . "recipes";
$db_table_list_names = $db_prefix . "list_names";
$db_table_list_recipes = $db_prefix . "list_recipes";
$db_table_list_ingredients = $db_prefix . "list_ingredients";
$db_table_related_recipes = $db_prefix . "related_recipes";
$db_table_favorites = $db_prefix . "favorites";
$db_table_stores = $db_prefix . "stores";
$db_table_reviews = $db_prefix . "reviews";
$db_table_ratings = $db_prefix . "ratings";
$db_table_meals = $db_prefix . "meals";
$db_table_mealplans = $db_prefix . "mealplans";
$db_table_mealplan_items = $db_prefix . "mealplan_items";
$db_table_restaurants = $db_prefix . "restaurants";
$db_table_prices = $db_prefix . "prices";

global $db_fields;

/*
Used to refer to field names without knowing their names
*/
$db_fields = array(
$db_table_ethnicity => array( "ethnic_id", "ethnic_desc" ),
$db_table_units => array( "unit_id", "unit_desc" ),
$db_table_bases => array( "base_id", "base_desc" ),
$db_table_prep_time => array( "time_id", "time_desc" ),
$db_table_courses => array( "course_id", "course_desc" ),
$db_table_difficulty => array( "difficult_id", "difficult_desc" ),
$db_table_locations => array( "location_id", "location_desc"),
$db_table_prices => array( "price_id", "price_desc"),
$db_table_meals => array("meal_id", "meal_name")


Shouldn't be a lot more to do after that.. maybe some tweaks here and there but most of the "modularization" could actually be done in the xoops_version.php and the custom_inc.php

22
JasonMR
Re: cookbook recipe maker
  • 2004/9/22 21:43

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


When somone gets this module working properly, could they offer the modified files for download please?

23
wcrwcr
Re: cookbook recipe maker
  • 2004/9/22 22:06

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hey Chad

So you did another one?

Did you get the last version at sourceforge?
Did you try to install it like a regular mod?

Regards

24
limecity
Re: cookbook recipe maker
  • 2004/9/23 6:44

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Ah.. here we go..
lets push this topic back on top..
to get more attention...

I want the module..
he wants the module..
she wants the module.
they want the module..

So anyone tried it yet..
I don't have a XOOPS test site.. therefore i can't test the follow mod posted above..

Tell me if it works..

25
limecity
Re:cookbook recipe maker
  • 2004/10/23 14:14

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


<bumpity bump>

26
CiberEspia
Re:cookbook recipe maker

http://www.bommelsch.nl/content/index.php?option=com_recipes

Somebody interested in port this component(recipes) of mambo to module for xoops

27
limecity
Re:cookbook recipe maker
  • 2004/10/29 18:26

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


that is sure one fine recipe module~
No developer seems to be free to make this Cook Book Recipe module despite great demand.

the first post of this topic is 2004/6/14.
and till today,members are still interested in this module...
mmMmMm....

28
rplima2004
Re:cookbook recipe maker
  • 2004/11/23 12:53

  • rplima2004

  • Just popping in

  • Posts: 70

  • Since: 2004/10/8


Firstly excuse me for terrible English.

Am I very interested in that module, did anybody there already get to use it in an efficient way?

I am already there is some time trying to use it up to now I didn't get. If somebody please had success they say what was necessary to do.

Thank you

Rodrigo

29
limecity
Re:cookbook recipe maker
  • 2004/11/23 15:03

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


sadly..
the module is not developed as far as i know

30
fredriksk
Re:cookbook recipe maker
  • 2004/11/27 9:28

  • fredriksk

  • Just popping in

  • Posts: 9

  • Since: 2004/5/10


Add me to the people that want to se this module become a module...

Login

Who's Online

155 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

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

Latest GitHub Commits