41
arrakis
PHP script into a Block
  • 2005/3/14 17:49

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hello all, I saw in the admin of XOOPS that I can add a block and specify that it is a PHP script, I never did it before but this time I needed to put a small php script into a cental block in the Home Page of the site (Top page of Xoops).

This script just check the date and display a different image if a certain date is passed.

I did the script separately and then I made a new block and put there the php code, and specified in the drop down menu that this block is a php script.

But the strange thing is that it works perfectly but I don't see anything else than the executed code, if i disable the script the site is ok, if i enable it i only see the script output and the site is gone

I looked for long here (Q&A, Faq, suppor) but I couldn't find any information regarding how to add a PHP script into a block in the top page.

Is there a special way how to add it or there is something wrong in my site? (btw it is a fresly new installation)

Thanks!



42
arrakis
Re: how to add a new page without using a module
  • 2005/2/21 8:46

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hello, thanks for the reply.

Yes I know how to add a new block, but I asked a different thing, if is possible to add a new blank page without using a existing module.

I know how to make a new stand-alone html page and wrap it with xoops, adding the php codes, but I wanted to know if there is a way to tell XOOPS to add a blank web page (and automatically link it to the main menu) that I will fill with blocks, and in the future admin this new page with XOOPS instead of editing the html code directly. All that without using or installing a module.

Thanks



43
arrakis
how to add a new page without using a module
  • 2005/2/17 8:59

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hi all, I have 2 sites running XOOPS and it's all perfect with all the modules etc, but I didn't understand yet how to add a new empty page without using an existing module or installing a new one.

For example... I have the home page, news and forum, but I want to add another page, let's call it "who we are" (or whatever), just like the home page but with a unique central block with 3 pictures and some text. I tryed to do it but I wasn't able to understand how.

I thought to work on the templates but seems to me that adding a new simple blank page, to fill with a block, should be too much an obvious task that shouldn't have the user to work with the "hard stuff", so I am asking you if there is a simple way, or the best way, to do it, cause I didn't found it yet.

Thanks in advance



44
arrakis
Re: spacing images in articles by using image manager
  • 2004/10/8 16:47

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Quote:

studioC wrote:
one solution could be like this:
If you are able to edit the modultemplates of the modul you are talking about (news", "sections") define an "id" around the content which your people should submit...
as an example from (part of) modultemplate news_item.html from newsmodul ..:
<h1>.... normally there is a title ..</h1>
<p id="inputcontent"><{$story.text}></p>
and define in your css:
#inputcontent img {padding:10px}
As always within xoops, there is more than one way to catch that cow. hope it helps!

michael


Hello Michael, thanks very much for the suggestion! I exactly did as you suggested and It works perfect

Thanks again!



45
arrakis
Re: spacing images in articles by using image manager
  • 2004/10/8 16:43

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Quote:

hervet wrote:
May be you could try to add an html space between the picture and the text (remove all the spaces between letters) :
& n b s p ;

Or, when you create your pictures, add a blank border ?

Bye,
Hervé


Hello, with the empty space the only first word will be spaced, but not the wrapped text that will begin attached to the image.

I thought to add a blank border but is not a good idea in the middle or long term use, if one day you would want to change background style then you will find with hundreds of blank borders to remove..

Thanks anyway for the suggestions



46
arrakis
spacing images in articles by using image manager
  • 2004/10/8 6:44

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hi all, when I add a new article in xoops, using "news", "sections", "wf-sections", etc, and I want to put an image inside the text, I use image manager, that put this code inside the text:

[img align=right ]http://www.domain.com/uploads/img415a6569e63d2.jpg[/img ]

and it works fine, but I would like to have a spacing between the pixels of the image and the text, because the text is attached to the image and that's not good. To solve this problem I use to upload the file into a dir in the site and use html intead:

<img align="left" hspace="5"
src="http://www.domain.com/uploadimages/img415fe3e6bb4fe.gif">


Now I have to give access to some people who will write articles but have no minimal idea how to use ftp or html code.

I tryed to add that spacing with the image manager code, in different ways, but I wasn't successfull and I also didn't find any reference on the [img] tags.

It is possible to add the horizontal spacing with image manager? Or is possible to specify a global horizontal spacing for all the images in the articles without effecting the images of the templates and other places that doesen't need spacing?

Thanks in advance



47
arrakis
spacing images in articles by using image manager
  • 2004/10/7 12:43

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hi all, when I add a new article in xoops, using "news", "sections", "wf-sections", etc, and I want to put an image inside the text, I use image manager, that put this code inside the text:

[img align=right ]http://www.domain.com/uploads/img415a6569e63d2.jpg[/img ]

and it works fine, but I would like to have a spacing between the pixels of the image and the text, because the text is attached to the image and that's not good. To solve this problem I use to upload the file into a dir in the site and use html intead:

<img align="left" hspace="5" src="http://www.domain.com/uploadimages/img415fe3e6bb4fe.gif">

Now I have to give access to some people who will write articles but have no minimal idea how to use ftp or html code.

I tryed to add that spacing with the image manager code, in different ways, but I wasn't successfull and I also didn't find any reference on the [img] tags.

It is possible to add the horizontal spacing with image manager? Or is possible to specify a global horizontal spacing for all the images in the articles without effecting the images of the templates and other places that doesen't need spacing?

Thanks in advance



48
arrakis
FIXED: Weird slash in the middle of the xoops url
  • 2004/10/1 14:07

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Funny, I only went away from office and came back after 1 hour, leaving everything exactly as explained before, I did "reload" the page and everything was fine. Now I have really no idea of what could be the cause of that very strange thing, but I guess now that was not my or XOOPS fault, since, with the exact same files and conf, before there was a problem and now is disappeared... maybe was some strange setting on the server or something like that...



49
arrakis
Re: Weird slash in the middle of the xoops url
  • 2004/10/1 13:00

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Quote:

Herko Coomans wrote:
have you updated the system module? (system admin -> modules, clik 'update icon' behind system module...)

herko


I can't update because I can't make the login. If i try to send user and password when it redirects me XOOPS uses the strange url www./domain... so I can't do anything

I think (as intuition) that it has something to do to mainfile.php but I cannot find the solution.



50
arrakis
Weird slash in the middle of the xoops url
  • 2004/10/1 12:38

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hi all, i did a migration of a XOOPS portal from a server to another server, I was worring much for the MySQL export-import but it was all fine, and now I got blocked in very strange problem that I can't find the solution.

In mainfile.php i have this:

// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
define('XOOPS_ROOT_PATH', 'd:/inetpub/webs/domainname/public');

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
define('XOOPS_URL', 'http://www.domainname.com/public');

"public" is the only directory where I, as user of a shared hosting, can change chmod to dirs so i have to work there.

Of course instead of "domainname" i have the real name of the site.

Everything works fine, the db connection is ok, I get the first page of the site, but after the first page the whole site (even the login) cannot be used, because every url inside the html code has a slash inside, like that:

<!DOCTYPE html PUBLIC '//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="content-language" content="it" />
<title></title>
<link rel="stylesheet" type="text/css" media="all" href="http://www./domainname.it/public/xoops.css" />

</head>
<body>
<table cellspacing="0">
<tr id="header">
<td style="width: 150px; background-color: #2F5376; vertical-align: middle; text-align:center;"><a href="http://www./domainname.it/public/"><img src="http://www./domainname.it/public/themes/default/logo.gif" width="150" alt="" /></a></td>
<td style="width: 100%; background-color: #2F5376; vertical-align: middle; text-align:center;">&nbsp;</td>

........................


There is this additional slash in the middle of the url after the www.

http://www./domainname.it/public/themes/default/logo.gif

and I can't make it go away, I tryed everything I could think...

Any suggestion?

Thank you in advance





TopTop
« 1 2 3 4 (5)



Login

Who's Online

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


Members: 0


Guests: 197


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