>>
Site Map
>>
Forums
>>
General 7x
Forum module - topics in forum:
General 7x - Discussions reagarding any other PHP-Nuke Problems. 7x
excel data in phpnuke
i run a couple of motorcycle racing websites, and should be taking over control of the website of the governing body for nothern ireland.
my problem will be with championship tables. the man responsible for doing these has been doing them in excel, and the document with the complete 2006 championship standings has over 1000 rows of information.
converting them to html gives me a lot of shitty code that i don't expect phpnuke tobe able to handle. although i was given a tip by another site of sending the excel document to a gmail account and viewing the document online (via some kind of converter they have going) which tidies the code somewhat that i am able to paste it into a phpnuke article, i was wondering if there was another way.
of this 1000+ row document, there'd be approx twenty championships that i'd actually prefer to have as seperate articles or "content" pages, and, as the 2007 season starts, i could be updating these on a weekly basis.
i'd been thinking of xml. is there a handy way to do this, and has anybody else used xml in content modules in phpnuke?
okay, so i split the excel doc into the three disciplines of racing we have here (clubmans, national, roads) and saved them as htm docs straight from excel and used this code so i could insert the htm as a module.
| Code: : |
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* PHP-Nuke-HOWTO module for <application>PHP-Nuke</application> */
/* */
/* Copyright (c) 2003 index.php */
/* by Chris Karakas */
/* http://www.karakas-online.de */
/* */
/* See licence.html for the Licence of the other files */
/* distributed together with this index.php file. */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the <acronym>GNU</acronym> General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0; // 0 : do not show right blocks - 1:show right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();
include("http://www.midulsterracing.co.uk/mcui/2006_champ_tables/2006_roads.htm"); // <-- CHANGE THIS!
CloseTable();
include("footer.php");
?> |
but it shows up on screen like this in an unsupported-by-this-site version of nuke and this is a supported version.
the page being inserted can be seen here.
i know the code can be tidied up a lot (i was more concerned with seeing how the page looked than the code to do it), but was wondering if there are any other tips.
i hope it's not the code generated by m$ excel as i'd be buggered if i'm going to handcode the whole thing every week as the championships are running. lol.
Try this
| Code: : |
<?php
if (!eregi("module.php", $PHP_SELF)) {
}
$index = 0;
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();
?>
<iframe width="100%" height="800" scrolling="auto" FrameBorder="0" MarginHeight="0" MarginWidth="0" SRC="http://www.midulsterracing.co.uk/mcui/2006_champ_tables/2006_roads.htm"></iframe>
<?php
CloseTable();
include("footer.php");
?> |
Works for me
http://phpnuke-uk.net/modules.php?name=road_racing
cheers for that. works like a charm.
i had used some iframe codes found on this site but they didn't work for some reason. i guess i just effed up somewhere. lol.
anyway, i had spent so much time this last couple of days pissing about with xml, or rather reading a bit about it, looking it up, trying to find out how to do it with phpnuke, working out how a mate did it here - he uses java for it and it seemed like i'd take a long time deciphering the code and adjusting it to suit.
i just gave up and decided to find a quick way that'll be handy once the race season starts.
and the cool thing is that it works in both sites (ie. the one that's supported by this site and the one that isn't) 
With data in an excel file, I usually save it as csv then import into dreamweaver, then paste into a page in content.
Don't know if that's an option for you, but it works for me. 
are you using wysiwyg editor or html editor for content in nuke, reb?
i getcha now reb. why didn't i think of it? i've used dreamweaver on occasion for doing articles (particularly in the earlier days using nuke before i got the hand of the relevant codes for formatting and inserting pics and links).
works like a charm to copying excel data and pasting into the wysiwyg editor in later versions of nuke.
many thanks for the suggestions. i really liked the one using iframe, and i will likely use it in the future, but for the handiness of rebelt's idea, it looks like it could be the i'll use for the championship tables.