xoops forums

Forum Index


Board index » All Posts




lubdub

Just popping in
Posted on: 2002/10/15 11:16
lubdub
lubdub (Show more)
Just popping in
Posts: 64
Since: 2002/2/28
#292191

I'd like smarter polls

Missing features I'd really would appreciate (of course, I could code them myself... but... not time for now )
- choose the way to record votes (for now, I think it's based on ip, but I have several users behind the same firewall, so it should be allowed to be based on username)
- allow/prevent anonymous users to vote
- show the list of voting users with their vote (at least for admin, but some polls could be completely public)


Akshara

Just popping in
Posted on: 2002/10/14 20:01
Akshara
Akshara (Show more)
Just popping in
Posts: 5
Since: 2002/8/9 4
#292192

Re: new page to my site ??.

Wow... this is one of the clearest and most informative posts I have ever come across. I would like to vote that this suggestion be placed in the "Module Docs" section here. Thank you swisslyons... Excellent.


pauleley

Just popping in
Posted on: 2002/10/14 18:33
pauleley
pauleley (Show more)
Just popping in
Posts: 13
Since: 2002/10/10
#292193

Re: new page to my site ??.

Thanks swisslyons
This works grate.


freeop

Just popping in
Posted on: 2002/10/13 23:13
freeop
freeop (Show more)
Just popping in
Posts: 25
Since: 2002/4/12
#292194

Re: new page to my site ??.

Nice.. Thx I can use this.. I created a little script using the filename as a variable so I didn't have to add the code to each page :

ie : wrap.php?file=mypage.html
ie : wrap.php?file=MyDir/mypage.html
--------------------------------------
<?php
include("mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
OpenTable();
include($file);
CloseTable();
include(XOOPS_ROOT_PATH."/footer.php");
?>
----------------------------------------


EDITED :
This works ok.. If you put this code into the root call it wrap.php.. Using http://your site/wrap.php?file=your.html or ?file=mydir/your.html as the link, it will show your html or php script in XOOPS display.. However the problem I had was any links from the page your calling had to be the same : mypage.html had to be changed to http://yoursite/wrap.php?file=

That is what the problem was, it doesn't read file and rewrite output changing links... But if you just want to show pages without editing each one it works great.. ( guess you can't really call it a wrapper )


swisslyons

Just popping in
Posted on: 2002/10/13 23:11
swisslyons
swisslyons (Show more)
Just popping in
Posts: 43
Since: 2002/6/23
#292195

Re: new page to my site ??.

Sure! no problem Paul and if you have any questions /problems just ask!

Regards,
john


pauleley

Just popping in
Posted on: 2002/10/13 23:09
pauleley
pauleley (Show more)
Just popping in
Posts: 13
Since: 2002/10/10
#292196

Re: new page to my site ??.

Thanks for the Info & all you Help.
I will give it a go and let you no how i get on.
Kind Regerdes
Paul


swisslyons

Just popping in
Posted on: 2002/10/13 22:54
swisslyons
swisslyons (Show more)
Just popping in
Posts: 43
Since: 2002/6/23
#292197

how to make a module

The way i usually do this is to make my own module for each page I want to display in the middle of Xoops. To make your own custom module, you only need to create 2 files: index.php and xoops_version.php in a new folder. Lets call this folder 'myModule' for example.

Then, in the index.php,

should copy/paste this code:
*****************************

<?php

include("../../mainfile.php");
include("../../header.php");
include("header.php");
OpenTable();

?>

your HTML content goes here, between these php tags ;) This also works for Flash content, just copy/paste from your flash.htnl file and place it here

<?
CloseTable();
include ("../../footer.php");
?>

**********************************
Here is a second possibility for creating your index.php, using an include(); instead of hardcoding the HTML in the php page. This helps make the code a bit more modular and easier to handle.
Create your html in Dreamweaver or whatever editor, then upload all files to this same module directory (myModule) for example)...and use this code to include it:

**********************************

<?php

include("../../mainfile.php");
include("../../header.php");
include("header.php");
OpenTable();

include("nameOfYourPage.html");


CloseTable();
include ("../../footer.php");
?>

**********************************

OK, then in xoops_version.php

copy/paste this code:
**********************************

<?php
$modversion['name'] = "title that you want to display in main menu";
$modversion['version'] = "alpha testing only";
$modversion['description'] = "description here";
$modversion['credits'] = "The XOOPS Project <BR /> Thanks to blah blah blah....";
$modversion['author'] = "John Lyons (http://www.flashbuilder.ch/)";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "logo.gif";
$modversion['dirname'] = "myModule";

// Menu
$modversion['hasMain'] = 1;



?>

Then upload this new folder to your modules directory. Log into your site as admin, go to Modules, and add this module. Don't forget to give group rights to access this module.

That should do it, I hope its all ok becuase its late here and I am tired.

P.S. --> if you are trying to include content that is on another URL and you cant copy/paste the code, try using the
framebrowser script


pauleley

Just popping in
Posted on: 2002/10/13 22:41
pauleley
pauleley (Show more)
Just popping in
Posts: 13
Since: 2002/10/10
#292198

Re: new page to my site ??.

Hi Thanks for the info i have downloaded FreeContent & installed it but when i try to it i get: Sorry, we were unable to find this Link-ID in our Database
Dos any one no my problem.
Thanks
Paul Eley


freeop

Just popping in
Posted on: 2002/10/13 8:25
freeop
freeop (Show more)
Just popping in
Posts: 25
Since: 2002/4/12
#292199

Re: new page to my site ??.

Go to this forum entry..A module name freecontent, and a Page Wrapper hack..


Forum Message


pauleley

Just popping in
Posted on: 2002/10/13 7:55
pauleley
pauleley (Show more)
Just popping in
Posts: 13
Since: 2002/10/10
#292200

new page to my site ??.

How do i add a new page to my site ??.
If i make a new block and put eg: Fish Help. How do i make it load a new page in the center of my site. As i am new to XOOPS and only youd HTML for my site in the past.
Any Help Please my old site is runing HTML marine-aquarium.co.uk
Thanks
Paul Eley