441
peterr
Re: .htaccess + Custom error pages + need more clearity .
  • 2004/8/11 9:41

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

vinit wrote:
just got few queries about the usage of .htaccess and errormessages.

1. Where do i put .htaccess file in root directory / or anywhere.


In the 'web root' path, which is usually of the format /home/username/public_html

Quote:

vinit wrote:
2. i have multiple sites hosted from same server spaces.
example
/foo ->www.foo.com
/bar ->www.bar.com

now i want to so different custom error msgs for both the directories is it possible.


Maybe something like this in PHP

<?php

// If user comes to site with preceeding string "www." , remove it, not required
$httphostname $_SERVER['HTTP_HOST'];
$hostname str_replace("www."""$httphostname);

$error_messages = array(
   
'foo.com' => 'Error message for foo.com site',
   
'bar.com' => 'Error message for bar.com site'
   
);

if (isset(
$error_messages[$hostname])) $errmsg $error_messages[$hostname];
   else 
$errmsg 'No error message set';
?>


Quote:

vinit wrote:
3. What should be the permision of .htaccess file and also the error files.


Usually a 644 for .htacess, and also for the PHP script (error file)

Peter



442
peterr
HTML code in mylinks ??
  • 2004/8/11 4:06

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

I've only just started to use the module 'mylinks', so pls excuse my ignorance. :)

I have tried adding html code into the description part of a link, all to no avail. Are there any 'hacks' or other (backdoor) methods to use html code ??

Underlining, bold, italics,.... nice, but I would like to use different types of bulleted lists, and other html code, and also I have noticed if I use (say) 4 spaces, the editor strips the number of spaces back to one.

I did try the 'code' button, but it displays like a quote block or similar.

Thanks,

Peter



443
peterr
Re: How can I create a page with product names and descriptions in Xoops?
  • 2004/8/11 4:01

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

daft009 wrote:
would it be possible to get a copy of this?

i need something like this too..


Yes, I would be interested to have a look at it, as you can see by this thread:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=23185&forum=4

I need a 'web hosting' module or similar, but why re-invent the wheel, if this products module could be adapted to suit other needs ?

Peter



444
peterr
Re: Web Hosting module
  • 2004/8/11 3:41

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Okay, thanks, if you can pass the info on, that will help.

Peter



445
peterr
Re: Web Hosting module
  • 2004/8/10 5:14

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Quote:

Bassman wrote:
Yeah, I noticed that the calculate button wouldn't work, i'm sure there's a simple reason for that.


Yes, possibly the GET should be a POST and the form has no ID or name, I'll just compare how it is done to other modules that do a submit, I'm sure it's very minor.

Thanks for the link to the zip file (will d/load now) and for making the module. :)

Peter



446
peterr
Re: Web Hosting module
  • 2004/8/10 5:04

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

Bassman wrote:
Recent intensive practice :) I've converted a few scripts to modules. It's not hard, especially if there's no database access involved. If you want it to have a look at how it's put together, let me know & i'll put it up for download.


Yes thanks, that would be good. I'll look into why the 'form submit' won't work within a module, but will work as a 'block'. No doubt there are other modules that do a submit, possibly because the form is submitting itself, if you know what I mean, that it has problems within a module ??

Peter



447
peterr
Re: Web Hosting module
  • 2004/8/10 4:56

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

That's incredible, how did you make it a module so quickly ?

I'm impressed !!

Peter



448
peterr
Re: Web Hosting module
  • 2004/8/10 4:41

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

It works as a 'stand-alone' block, see:

http://www.jehoshua.net/web-hosting.php

after I wrapped the necessary XOOPS 'before/after PHP code', it works okay, the POST is working, but of course, I've lost all those bright 'dazzling' colours (just a minor styelsheet change if I _really_ want them.

I didn't have to add it in under admin, that is, as a block, it simply works 'as is'.

Peter



449
peterr
Re: Web Hosting module
  • 2004/8/10 4:23

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

Bassman wrote:
Cool.
You could just drop the script into a custom block - although I don't know if it would work that way. it wouldn't take much to make the script into a module as-is, without any db connections etc.

You can get the script from
http://scripts.franciscocharrua.com/web-hosting-shopping-cart.php


Thanks for the link to the script, that will be a good start. Yes, as you say, put it in a custome block (like athttp://www.jehoshua.net/terms.php ), but maybe the POST wouldn't work ??

Do modules always have to go like this .........

http://example.com/module/webhosting

Hmm, I guess I could still use the module approach for installation and admin useage, but maybe just do a 'header/location' in PHP from a link to point to the /module/webhosting path.

Many ways to skin a cat as they say (but who would want to eat a cat ?? )

Thanks for your help, this will be great, even if I rework it a bit to suit the 3 basic plans that we offer, it will save me a lot of work.

Thanks, much apperciated, :)

Peter



450
peterr
Re: Web Hosting module
  • 2004/8/10 4:08

  • peterr

  • Just can't stay away

  • Posts: 518

  • Since: 2004/8/5 9


Hi,

Quote:

Bassman wrote:
peter,
I found a script that might be adaptable to your requirements.... have a look athttp://www.bassmanthemes.x8r.com/test.php It doesn't actually do anything,but it may be a good start.


That would certainly do for the interim period. No doubt all the select/options are calculated in the PHP script and not actually pulled out of a database. However that script would certainly suffice in the interim period, whilst I figure out how to do a module, test it, etc,etc.

Thanks,

Peter




TopTop
« 1 ... 42 43 44 (45) 46 47 48 49 »



Login

Who's Online

188 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 188


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