PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Fri Apr 15, 2005 6:45 pm Reply with quote Back to top

I need very simple module for my products.Don't need categories or something special.
All i want is to show my products like that:
Image
...................
(read more..) to call simple extended info text page!
Could someone to help me??
Thank!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

PostPosted: Sat Apr 16, 2005 7:35 am Reply with quote Back to top

If your not using it for something else you could use the Content module or something. Seriously I'd consider using one of the Cart modules since there would be the added benefit of some pre-designed blocks and so on...

Otherwise even for a simple module from scratch your probably looking at around $200.00-$300.00 give or take, money better spent for advertising or something IMO.

But anyway no I don't know of a simple knock off of the news which is basically what you have described.
View user's profile Send private message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Sat Apr 16, 2005 9:29 am Reply with quote Back to top

the problem is that, i'm using Content Module already, and i put Title(History) on it...so no matter what i add to it...it's shown with the Title 'History'.If i can configure it to show Title on only one Categoriq or i don't know.Or i'll just copy the Content module, and rewrite the code and the tables like $pid1,$content1 etc etc...
I would like to make this moduke on my own...it need only 3 sql values...$title,$img,$extendedtext ...nothing more.But i'm at the begining of my php-sql knowledge..so i can make admin form to inject the things in the table,but i cant call them (sql fretchrow...etc etc).I'll try to find some basic Tutorial...

BTW.How can i make in index.php in a module to show extended contents!
I mean...diffirent pages inside the module?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Sun Apr 17, 2005 4:46 pm Reply with quote Back to top

ok i got a little progress with my module:))
Now only left to make admin panel and multilingual , because my site is runnin` on 3 languages.
I added $alanuage value to the table nuke_products , so in the admin i'll be able to input the language there.Could someone help me to show only content with
$currentlanguage = $alanguage ??? Same like blocks, news module etc.... got this option to choose in which langage to be shown.
Here is the code:
Quote:

<?php

/***********************************************************/
/* PHP-NUKE: Products module! Virgin_Steel */
/* =========================== */
/* */
/*****************************************************/

if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");

}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

// ######################
// ## Display All Products ##
// ######################
function DisPro(){
global $prefix, $db, $module_name, $nukeurl, $dbi, $themecurrentlang, $multilingual, $currentlang;
if ($multilingual == 1) {
$querylang = "AND (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
include("header.php");
$result = $db->sql_query("SELECT * FROM ".$prefix."_products ORDER BY sid");
$num = $db->sql_numrows($result);
if($num) {
echo "<center><img src=\"themes/Ace-Orange/language/lang_$themecurrentlang/modules/prod.gif\" border=\"0\"></center>";
while ($row = $db->sql_fetchrow($result)) {
$sid = "$row[sid]";
$title = "$row[title]";
$bodytext = "$row[bodytext]";
$hometext = "$row[hometext]";
$img = "$row[img]";
$alanguage = "$row[alanguage]";
echo"<table border='1' cellpadding='2' cellspacing='5' width='100%' class='row1'><tr>";
echo" <td class='row1' width='230' align=\"center\"><a href=\"images/products/$img\" target=\"_blank\"><img src=\"images/products/$img\" alt=\"$title\" border=\"0\" align=\"center\"></a></td><td><b>$title</b><br><br>$hometext<br><a href=\"modules.php?name=Prob&func=readm&sid=$sid\">("._RMORE.")</a></td></tr>";
}
echo "</table>\n";
} else {
echo "<table width=\"100%\"><tr><td>";
echo "<center><img src=\"images/products/$img\" alt=\"$img\"></center></td><td class='row1'><b>$title</b><br><br>$hometext<br>";
echo "</td></tr></table>";
}
include("footer.php");
}
// ################
// ## Display Product ##
// ################
function readm($sid){
include("header.php");
global $prefix, $db, $module_name, $sid, $nukeurl, $dbi, $themecurrentlang;
$result = $db->sql_query("SELECT * FROM ".$prefix."_products WHERE sid='$sid'");
$num = $db->sql_numrows($result);
if($num) {
echo "<center><img src=\"themes/Ace-Orange/language/lang_$themecurrentlang/modules/prod.gif\" border=\"0\"></center>";
while ($row2 = $db->sql_fetchrow($result)) {
$sid = "$row2[sid]";
$title = "$row2[title]";
$bodytext = "$row2[bodytext]";
$hometext = "$row2[hometext]";
$img = "$row2[img]";
}
echo"<img alt=\"$title\" src=\"images/products/$img\" border=\"0\" align=\"left\"><center><b>$title</b><br><br>$bodytext<br><br><br>"._GOBACK."</center>";
} else {
echo "<table width=\"100%\"><tr><td>";
echo "<center><img src=\"images/products/$img\" alt=\"$img\"></center></td><td class='row1'><b>$title</b><br><br>$hometext<br>";
echo "</td></tr></table>";
}
include("footer.php");
}

switch($func) {

default:
DisPro();
break;

case "readm":
readm($sid);
break;
}
?>


Pls.Help!Thank U!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Mon Apr 18, 2005 7:47 am Reply with quote Back to top

HM looks like no one wants to help me...
I just made it, with all night no sleeping.
Now need help with the admin file.I made it but when i click on post, nothin`...blank page.Just want to insert SQL Values to the table.So that's the code.I don't see any mistakes, but if you do, tell me pls.It's just 2 functions:
Quote:

<?php

/************************************************************************/
/* Products */
/************************************************************************/

if ( !defined('ADMIN_FILE') )
{
die("Illegal File Access");
}

global $prefix, $db, $admin_file;
if (!stristr($_SERVER['SCRIPT_NAME'], "".$admin_file.".php")) {
die ("Access Denied");
}

$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Encyclopedia'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
$auth_user = 1;
}
}

if ($row2['radminsuper'] == 1 || $auth_user == 1) {
/*********************************************************/
/* Story/News Functions */
/*********************************************************/

function addprod($sid) {
global $prefix, $db, $language, $multilingual, $admin_file;
include ('header.php');
OpenTable();
echo "<center><font class=\"title\"><b>"._PRODADMIN."</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class=\"option\"><b>"._ADDPROD."</b></font></center><br><br>"
."<form action=\"".$admin_file.".php\" method=\"post\">"
."<b>"._TITLE."</b><br>"
."<input type=\"text\" name=\"title\" size=\"50\"><br><br>"
."<b>"._IMG."</b><br>"
."<input type=\"text\" name=\"img\" size=\"50\"><br><br>"
."<b>"._IMG2."</b><br>"
."<input type=\"text\" name=\"img2\" size=\"50\"><br><br>"
."<br>";
if ($multilingual == 1) {
echo "<br><b>"._LANGUAGE.": </b>"
."<select name=\"alanguage\">";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($i=0; $i < sizeof($languageslist); $i++) {
if($languageslist[$i]!="") {
echo "<option value=\"$languageslist[$i]\" ";
if($languageslist[$i]==$language) echo "selected";
echo ">".ucfirst($languageslist[$i])."</option>\n";
}
}
echo "<option value=\"\">"._ALL."</option></select>";
} else {
echo "<input type=\"hidden\" name=\"alanguage\" value=\"$language\">";
}
echo "<input type=\"hidden\" name=\"sid\" value=\"5\">";
echo "<br><br><b>"._STORYTEXT."</b><br>"
."<textarea wrap=\"virtual\" cols=\"50\" rows=\"12\" name=\"hometext\"></textarea><br><br>"
."<b>"._EXTENDEDTEXT."</b><br>"
."<textarea wrap=\"virtual\" cols=\"50\" rows=\"12\" name=\"bodytext\"></textarea><br>"
."<select name=\"op\">"
."<option value=\"postprod\">"._POSTSTORY."</option>"
."</select>"
."<input type=\"submit\" value=\""._OK."\">";
CloseTable();
echo "<br>";
echo "</form>";
include ('footer.php');
}

function postprod($sid, $title, $hometext, $bodytext, $img, $img2, $alanguage) {
global $prefix, $db, $admin_file;
$title = stripslashes(FixQuotes($title));
$hometext = stripslashes(FixQuotes($hometext));
$bodytext = stripslashes(FixQuotes($bodytext));
$db->sql_query("insert into ".$prefix."_products values(NULL, '$sid', '$title', '$hometext', '$bodytext', '$alanguage', '$img', '$img2')");
Header("Location: ".$admin_file.".php?op=adminMain");
}

switch($op) {

case "addprod":
addprod($sid);
break;

case "postprod":
postprod($sid, $title, $hometext, $bodytext, $img, $img2, $alanguage);
break;
}

} else {
include("header.php");
GraphicAdmin();
OpenTable();
echo "<center><b>"._ERROR."</b><br><br>You do not have administration permission for module \"$module_name\"</center>";
CloseTable();
include("footer.php");
}

?>
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Mon Apr 18, 2005 8:23 am Reply with quote Back to top

ok i fixed everything Smile)
i forgot to put case "postprod" in case.php...!Now everything works fine!
Thanks everybody who helped me! Smile)))
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Michael-CGC
Hangin' Around


Joined: Apr 07, 2005
Posts: 29

PostPosted: Mon Apr 18, 2005 10:16 am Reply with quote Back to top

Hey Virgin_Steel

Your module sounds just something that I need :O) Could I have it? :O)

regards,
Michael
View user's profile Send private message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Mon Apr 18, 2005 1:11 pm Reply with quote Back to top

Michael-CGC, i'll make edit and delete function, maybe and upload for images...and i will post link for download here!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Mon Apr 18, 2005 5:47 pm Reply with quote Back to top

ok Product module v1.0 is OUT!Smile)
EDIT:I Found some bugs...i'll make it just today!
Enjoy.And dont kill me with stones that's my second module:)


Last edited by Virgin_Steel on Tue Apr 19, 2005 6:23 am; edited 1 time in total
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Michael-CGC
Hangin' Around


Joined: Apr 07, 2005
Posts: 29

PostPosted: Tue Apr 19, 2005 2:39 am Reply with quote Back to top

Virgin_Steel wrote:
ok Product module v1.0 is OUT!Smile)
You can download it from
Only registered users can see links on this board!
Get registered or login to the forums!

Enjoy.And dont kill me with stones that's my second module:)


Mate, the link doesn't work :O)
View user's profile Send private message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Tue Apr 19, 2005 4:08 am Reply with quote Back to top

Michael-CGC, i dunno what's happening with my host.server is down for 6 hours...I could send the module you via mail.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Michael-CGC
Hangin' Around


Joined: Apr 07, 2005
Posts: 29

PostPosted: Tue Apr 19, 2005 4:16 am Reply with quote Back to top

Virgin_Steel wrote:
Michael-CGC, i dunno what's happening with my host.server is down for 6 hours...I could send the module you via mail.


Weird! :O/

Plz send it to
Only registered users can see links on this board!
Get registered or login to the forums!
.

Thx mate :O)
View user's profile Send private message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Tue Apr 19, 2005 4:30 am Reply with quote Back to top

sent

Next feature will be Uploading of the images..
Is there anybody who can quick help me about it?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Mesum
Useless


Joined: Aug 23, 2002
Posts: 213
Location: Chicago

PostPosted: Tue Apr 19, 2005 5:11 am Reply with quote Back to top

I am not able to download this file as well.
mesum(@)chicagobase(.)com
View user's profile Send private message Visit poster's website
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Tue Apr 19, 2005 10:03 am Reply with quote Back to top

Only registered users can see links on this board!
Get registered or login to the forums!

Please read Install.txt for versions diffirent from Platinium!
I tested it on Nuke PLatinium, 7.1, 7.0, 7.2 and works without problems!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Michael-CGC
Hangin' Around


Joined: Apr 07, 2005
Posts: 29

PostPosted: Wed Apr 20, 2005 2:05 am Reply with quote Back to top

Virgin_Steel wrote:
Only registered users can see links on this board!
Get registered or login to the forums!

Please read Install.txt for versions diffirent from Platinium!
I tested it on Nuke PLatinium, 7.1, 7.0, 7.2 and works without problems!


Cool mate. I actually use phpnuke platinium :O)

Are you good at making modules? :O)
View user's profile Send private message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Wed Apr 20, 2005 4:19 am Reply with quote Back to top

Virgin_Steel wrote:
ok Product module v1.0 is OUT!Smile)
EDIT:I Found some bugs...i'll make it just today!
Enjoy.And dont kill me with stones that's my second module:)

Actually i have modified all the modules on my Nuke site.And have made and modify many blocks too.But that's my first module i build all alone.I'm just learning.
After few hours i'll post link for the module with the upload function.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Michael-CGC
Hangin' Around


Joined: Apr 07, 2005
Posts: 29

PostPosted: Wed Apr 20, 2005 4:22 am Reply with quote Back to top

Virgin_Steel wrote:
Virgin_Steel wrote:
ok Product module v1.0 is OUT!Smile)
EDIT:I Found some bugs...i'll make it just today!
Enjoy.And dont kill me with stones that's my second module:)

Actually i have modified all the modules on my Nuke site.And have made and modify many blocks too.But that's my first module i build all alone.I'm just learning.
After few hours i'll post link for the module with the upload function.


Is the answer "no"? lol :O)
View user's profile Send private message
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Wed Apr 20, 2005 4:34 am Reply with quote Back to top

The Answer is "i'm learning and trying hard to be good" Smile)


For those who have downloaded the module there is one little bug:
change this line - for Older Nuke versions in admin/modules/products.php
Line 104:
from
Code:
   $db->sql_query("insert into ".$prefix."_products values (NULL, '$title', '$hometext', '$bodytext', '$img2', '$img', '$alanguage')");

to
Code:
   $db->sql_query("insert into ".$prefix."_products values (NULL, '$title', '$hometext', '$bodytext', '$img', '$img2', '$alanguage')");


For newer versions of Nuke
in modules/Porducts/admin/index.php Line 123
from
Code:
   $db->sql_query("insert into ".$prefix."_products values (NULL, '$title', '$hometext', '$bodytext', '$img2', '$img', '$alanguage')");

to
Code:
   $db->sql_query("insert into ".$prefix."_products values (NULL, '$title', '$hometext', '$bodytext', '$img', '$img2', '$alanguage')");

Sorry!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Virgin_Steel
Worker
Worker


Joined: Sep 30, 2004
Posts: 108
Location: Sf

PostPosted: Wed Apr 20, 2005 10:31 am Reply with quote Back to top

OK Now out is fixed version with Upload function.
Easy uploading of files with only two clicks:)
Only registered users can see links on this board!
Get registered or login to the forums!
Product module V1.1Smile)
Hope you'll like it!

EDIT: I just added select function.Now when you have uploaded an image,you'll just need to select it , not like before, to write the filename.
EDIT2: I just added a cool java effect.When you are selecting the images,they are showed beside, so you preview them before post them.It's the same like the avatar in Your_Account!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum