Topic: need help with a module edit
this(code below) is a module for postnuke(3rd party) that i use for my site. i would like the "link to us" images that are shown be vertical not horizontal and have their respective filenames that are shown in the rollout put to the right of them which will make selecting a button from multiple images alot easier. PLEASE and thank you. i posted this here becuase everyone here seems to be very helpfull and quick to respond.
<?php
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Filename: modules/NS-Link_To_Us/index.php
// Original Author of file: Crick Da Crack
// Purpose of file: Let's user make links to the PostNuke site
// ----------------------------------------------------------------------
// Changelog
// 03/10/02 - Crick : Started this little module
// ----------------------------------------------------------------------
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
$ModName = $GLOBALS['name'];
//Change the value of those vars if you need to
$lts_imgdir = "modules/$ModName/img/"; //Use $ModName for the module name. Default : modules/$ModName/img/
//Here the script, don't edit if you don't know what your doing !!!
modules_get_language();
$modurl="modules.php?op=modload&name=$ModName&file=index";
$sitename = pnConfigGetVar('sitename');
$slogan = pnConfigGetVar('slogan');
$baseurl = pnGetBaseURL();
include 'header.php';
OpenTable();
echo "<font class=\"pn-title\"><a href=\"".$modurl."\">"._LTS_TITLE." ".$sitename."</a></font><br><br>";
if (!$link) {
$lts_dir = opendir($lts_imgdir);
$lts_filelist = array();
$lts_ext = array('.jpg','.gif','.png');
$i = 0;
while ($file = readdir($lts_dir)) {
if ((strrchr($file,'.gif') == '.gif') || (strrchr($file,'.jpg') == '.jpg') || (strrchr($file,'.png') == '.png') || (strrchr($file,'.bmp') == '.bmp')) {
$lts_filelist[$i] = $file;
$i++;
}
}
CloseDir($lts_dir);
if (empty($lts_filelist)) {
echo _LTS_NOIMG."<br><br>";
echo "<form action=\"modules.php?op=modload&name=$ModName&file=index\" method=\"post\">"
._LTS_YOURCHOICE."<br><select size=\"1\" name=\"link\">"
."<option selected value=\"text\">"._LTS_TEXT."</option>";
}
else {
echo _LTS_BLIST."<br><br>";
$i = 0;
while ($lts_filelist[$i]) {
echo "<img src=\"$lts_imgdir/$lts_filelist[$i]\" alt=\"$lts_filelist[$i]\"> ";
$i++;
}
echo "<form action=\"modules.php?op=modload&name=$ModName&file=index\" method=\"post\">"
._LTS_YOURCHOICE."<br><select size=\"1\" name=\"link\">"
."<option selected value=\"text\">"._LTS_TEXT."</option>";
$i = 0;
while ($lts_filelist[$i]) {
echo "<option>".$lts_filelist[$i]."</otpion>";
$i++;
}
}
echo "</select><br><input type=\"submit\" value=\""._LTS_SUBMIT."\">"
."</form>";
}
else {
if ($link == "text") {
echo _LTS_PREVIEW."<br><a href=\"".$baseurl."\">".$sitename." :: ".$slogan."</a><br><br>";
echo _LTS_CODE."<br><textarea rows=\"4\" cols=\"80\"><a href=\"".$baseurl."\">".$sitename." :: ".$slogan."</a></textarea><br><br>";
}
else {
if (file_exists($lts_imgdir.$link)) {
echo _LTS_PREVIEW."<br><a href=\"".$baseurl."\"><img src=\"".$baseurl.$lts_imgdir.$link."\" alt =\"".$sitename." :: ".$slogan."\" border=\"0\"></a><br><br>";
echo _LTS_CODE."<br><textarea rows=\"4\" cols=\"80\"><a href=\"".$baseurl."\"><img src=\"".$baseurl.$lts_imgdir.$link."\" alt =\"".$sitename." :: ".$slogan."\" border=\"0\"></a></textarea><br><br>";
}
else echo _LTS_ERRIMG."<br><br>";
}
}
CloseTable();
echo "<br>";
OpenTable();
echo "Link To Us Module 0.1 : Crick Da Crack (<a href=\"http://hell.eenixweb.com\" target=\"_blank\">Web</a>/<a href=\"mailto:hell@[removethis]hell.eenixweb.com\">Email</a>)";
CloseTable();
include 'footer.php';
?>
FluxBB - Less is more