21
Jyotirmaya
Picking up windows environment variables in PHP
  • 2005/12/20 11:20

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


I would like to know whether there is any way to pick up the windows environment variables (eg %username%) in PHP. I believe it is possible in asp, but not sure about PHP (I use a LAMPP setup)

I am using the ldap authentication tool to authenticate users against active directory 2003 (using XOOPS 2.2). I would like to move towards a true single sign-on environment, where XOOPS automatically picks up the username and (hopefully!)password of the user currently logged in to the windows workstation (currently all my users are on windows).

I would also like to use this to design a "Call me!" support button that would submit a support email and tell me who the user was (%username%) just by them pressing a button.

Anybody have any takes on this please.
"You are never alone or helpless, the force that guides the stars guides you too"



22
Jyotirmaya
DMS and Xoops search
  • 2005/11/24 18:47

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


Is it possible to enable the XOOPS search function to search (just) the titles of DMS rather than having to use the DMS search function??
"You are never alone or helpless, the force that guides the stars guides you too"



23
Jyotirmaya
Re: cbb 2.2 Admin blank page
  • 2005/11/4 9:51

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


Thanks phppp,

I will try this on my system just as soon as I get it back together again.

I am running a xampp setup and I saw that a xoopser in china was having the same problem on a xampp setup, so I decided to try to upgrade xampp....

Things are coming back again, but I need to do a bit more tweaking in order to be able to test this out. (upgrading to MySQL 5 is a little tricky)
"You are never alone or helpless, the force that guides the stars guides you too"



24
Jyotirmaya
Re: Extended Profiles - 2.2.3 Final
  • 2005/11/2 18:16

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


May sound obvious, but did you try users>groups and then modifying the anonymous user group?
I recall having the same problem and I think I got around it like that without a reinstall
"You are never alone or helpless, the force that guides the stars guides you too"



25
Jyotirmaya
Re: cbb 2.2 Admin blank page
  • 2005/11/2 10:51

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


I have just tried to install CBB 2.3 on a fresh install of XOOPS and still get the following error:-
Quote:
Cannot redeclare newbb_message() in /opt/lampp/htdocs/healthcare/modules/newbb/include/functions.php on line 32

Please can anyone help me out, I am unable to get this going.....

The only workaround I have found for this is to comment out line 32 of functions.php,
Quote:
function newbb_message( $message )

which lets me in to the admin menu for one time only. Then if I try to access it again (like after I have made a change it says
Quote:

Fatal error: Cannot redeclare newbb_load_lang_file() in /opt/lampp/htdocs/healthcare/modules/newbb/include/functions.php on line 46


Line 46 says:
Quote:
function newbb_load_lang_file( $filename, $module = '', $default = 'english' )


Then I need to go in and uncomment line 32 and I can get in once again....

Help - this is tiring!!!
"You are never alone or helpless, the force that guides the stars guides you too"



26
Jyotirmaya
Re: xyp4all map button
  • 2005/10/17 13:39

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


I just posted the code you need to replace the current map button with in order to do a UK postcode search on multimap.com over
here
"You are never alone or helpless, the force that guides the stars guides you too"



27
Jyotirmaya
Re: Upgrade to mxDirectory problem
  • 2005/10/17 13:37

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


okay I worked it out with multimap

Quote:

<!--Jyoti's map button-->
<{if $link.zip != ""}>
<tr><td>
<form name=mapForm2 action="http://www.multimap.com/map/places.cgi" target="_new" method="get" name="search">
<input type="hidden" value="public" name="client">
<input type="hidden" value="" name="lang">
<input type="hidden" value="" name="advanced">
<input type="hidden" class="text" value="<{$link.zip}>" id="qs" name="quicksearch">
<input type=submit name="getmap" value="Map">
</form>
</td>
</tr>
<{/if}>


---just searches on the postcode (zip) info
"You are never alone or helpless, the force that guides the stars guides you too"



28
Jyotirmaya
Re: Upgrade to mxDirectory problem
  • 2005/10/17 12:54

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


I'm using xyp4all which has a similar map function, 'cept it looks at yahoomaps which can only access canada and US maps.

Are you able to help me to get this look at multimap.co.uk or streetmap.co.uk or some other mapping site that allows me to find locations in the UK?

current code is:-
Quote:
<td>
<form name=mapForm2 action="http://us.rd.yahoo.com/maps/home/submit_a/*-http://maps.yahoo.com/maps" target="_new" method=get>
<input type="hidden" name="addr" value="<{$link.address}>">
<input type="hidden" name="csz" value="<{$link.city}>, <{$link.state}> <{$link.zip}>">
<input type="hidden" name="country" value="us">
<input type=hidden name=srchtype value=a>
<input type=submit name="getmap" value="Map">
</form>
</td>
"You are never alone or helpless, the force that guides the stars guides you too"



29
Jyotirmaya
Re: Different onstances of imenu or multimenu
  • 2005/10/10 11:00

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


I found this in the Doc folder of multimenu
Quote:
multiMenu : how to add new menu blocks?

Author : Hervé

You have installed multiMenu and you are happy with it. But four menus are not enough. No problem. Add your own menus thanks to those indications...


1) Preparation

Go in the XOOPS admin pannel, desactivate and uninstall the module. Pay attention you will loose all your datas, except if you make a previous database backup. This step is necessary as you will need to add a new table to the database.


2) MySQL and Database

Open the /xoops/modules/multiMenu/sql/mysql.sql file and copy the table definition with a new name. For instance, copy the 'multimenu04' and name it 'multimenu05'. This would appear like this:

CREATE TABLE multimenu05 (
id int(5) unsigned NOT NULL auto_increment,
title varchar(150) NOT NULL default '',
hide tinyint(1) unsigned NOT NULL default '0',
link varchar(255) default NULL,
imageurl varchar(255) NOT NULL default '',
weight tinyint(4) unsigned NOT NULL default '0',
target varchar(10) default NULL,
groups varchar(255) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;



3) xoops_version.php

Open /xoops/modules/multiMenu/xoops_version.php

Spot the next lines:
$modversion['tables'][0] = "multimenu01";
$modversion['tables'][1] = "multimenu02";
$modversion['tables'][2] = "multimenu03";
$modversion['tables'][3] = "multimenu04";

Right behin add the followin line:
$modversion['tables'][4] = "multimenu05";

Then, still in the same file spot the next lines:
$modversion['blocks'][4]['file'] = "multimenu.php";
$modversion['blocks'][4]['name'] = _IM_MULTIMENU_NAME_04;
$modversion['blocks'][4]['description'] = "link menu";
$modversion['blocks'][4]['show_func'] = "multimenu_show";
$modversion['blocks'][4]['edit_func'] = "multimenu_edit";
$modversion['blocks'][4]['options'] = "ol|0|1|weight ASC|255|2|90|160|04";
$modversion['blocks'][4]['template'] = 'multimenu_block_04.html';

Copy and past them next to that bloc with the followin modifications:
$modversion['blocks'][5]['file'] = "multimenu.php";
$modversion['blocks'][5]['name'] = _IM_MULTIMENU_NAME_05;
$modversion['blocks'][5]['description'] = "link menu";
$modversion['blocks'][5]['show_func'] = "multimenu_show";
$modversion['blocks'][5]['edit_func'] = "multimenu_edit";
$modversion['blocks'][5]['options'] = "ol|0|1|weight ASC|255|2|90|160|05";
$modversion['blocks'][5]['template'] = 'multimenu_block_05.html';

Note : Pay attention to change the '..|04' in '..|05' values on the line '$modversion['blocks'][5]['options']'. This is really important!

Now increase number of the followin blocks :

$modversion['blocks'][5]['file'] = "multimenu_add.php";
$modversion['blocks'][5]['name'] = _IM_MULTIMENU_NAME_A;
$modversion['blocks'][5]['description'] = "link menu";
$modversion['blocks'][5]['show_func'] = "multimenu_add_show";
$modversion['blocks'][5]['edit_func'] = "multimenu_add_edit";
$modversion['blocks'][5]['options'] = "menu|0|1|weight ASC|255|2|90|160|01";
$modversion['blocks'][5]['template'] = 'multimenu_block_A.html';

$modversion['blocks'][6]['file'] = "multimenu_add.php";
$modversion['blocks'][6]['name'] = _IM_MULTIMENU_NAME_B;
$modversion['blocks'][6]['description'] = "link menu";
$modversion['blocks'][6]['show_func'] = "multimenu_add_show";
$modversion['blocks'][6]['edit_func'] = "multimenu_add_edit";
$modversion['blocks'][6]['options'] = "menu|0|1|weight ASC|255|2|90|160|01";
$modversion['blocks'][6]['template'] = 'multimenu_block_B.html';


4) Languages

Edit the file /xoops/modules/multiMenu/language/french/modinfo.php

Spot the next line:
define("_IM_MULTIMENU_NAME_04", "multiMenu 4");

Add right behind it:
define("_IM_MULTIMENU_NAME_05", "multiMenu 5");

Still in the same file, spot the line:
define("_IM_MULTIMENU_DESC", "Permet de créer jusqu'à 4 Menus Personnalisés différents.");

and replace by:
define("_IM_MULTIMENU_DESC", "Permet de créer jusqu'à 5 Menus Personnalisés différents.");

Execute the same operation for the next file: /xoops/modules/multiMenu/language/english/modinfo.php


5) Admin menu

Open /xoops/modules/multiMenu/admin/menu.php

Spot the 2 next lines:
$adminmenu[3]['title'] = _IM_MULTIMENU_NAME_04;
$adminmenu[3]['link'] = "admin/index.php?Menu=04";

Copy and past them right behind as following:
$adminmenu[4]['title'] = _IM_MULTIMENU_NAME_05;
$adminmenu[4]['link'] = "admin/index.php?Menu=05";



6) Navigation menu

Edit /xoops/modules/multiMenu/admin/index.php

Spot the lines:
$tblcolor[1]=$tblcolor[2]=$tblcolor[3]=$tblcolor[4]="#DDE";

Replace by:
$tblcolor[1]=$tblcolor[2]=$tblcolor[3]=$tblcolor[4]=$tblcolor[5]="#DDE";


Spot the lines:
echo "<li style="list-style: none; margin: 0; display: inline; "><a href="index.php?Menu=04" style="padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblcolor[4]."; text-decoration: none; ">". _IM_MULTIMENU_NAME_04 ."</a></li>";

Copy and past them as following:
echo "<li style="list-style: none; margin: 0; display: inline; "><a href="index.php?Menu=05" style="padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; background: ".$tblcolor[5]."; text-decoration: none; ">". _IM_MULTIMENU_NAME_05 ."</a></li>";

Now you got it. You just have to replace all the '04' by '05' and '4' by '5'.
Check twice to be sure you have replaced them all correctly.


7) Template file

Duplicate one of the bloc template and rename it.
ex : multimenu_block_04.html -> multimenu_block_05.html


8) Final installation

Now your files are ready, you can reinstall your custom multiMenu module in the admin config pannel.
If you have done everything as explained, you should get a 5th multiMenu bloc.


I wonder if this would work past 9 blocks since there seem to be many instances of a menu block being recorded as 5 instead of 05. Anyone done this for more than 9 blocks??
"You are never alone or helpless, the force that guides the stars guides you too"



30
Jyotirmaya
Re: cbb 2.2 Admin blank page
  • 2005/10/10 10:20

  • Jyotirmaya

  • Not too shy to talk

  • Posts: 105

  • Since: 2005/2/10


I did this, and it made no difference.
I uninstalled CBB, downloaded and installed a clean version of cbb and deleted my templates, but still did the same thing.
"You are never alone or helpless, the force that guides the stars guides you too"




TopTop
« 1 2 (3) 4 5 6 ... 8 »



Login

Who's Online

230 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 230


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