You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 153 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - One Modification on NukeC 2.1 (price) [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
ibstk
Nuke Soldier
Nuke Soldier


Joined: Jul 12, 2003
Posts: 25


PostPosted: Sat Jul 12, 2003 8:29 pm Reply with quoteBack to top

Hi,

I'm Newbies here! Very Happy

I am try make only one modification in NukeC 2.1.
I would like that the field "Price" accepted letters (a, b, c, d, e, f...). The default only accepted numbers.

When I post new Ads, I fill the field "Price" of the form with numbers and works normally. E.g.: 31.33 or 51.999
Result in view Ads: Price : US$ 31.33 or 51.999.

Post New Ads Form
Main Ads (view Ads)

But when I fill the field "Price" with letters they're not shown when I visualize the Ads, or either, it's blank. E.g.: Price : US$

Which the modifications that I must make so that the field "Price" has accepted letters (a, b, c, d...) and when visualizes the Ads, either shown perfectly? Price : US$ ABCDEF

Please, it is very important for me this modification. I am learning and initiating php and mysql through phpnuke. This doubt kill me days.

.../modules/NukeC/functions.php

Ads Theme

function themeads

Code:

 if (($xprice != "") and ($xprice != 0)) {
          echo "<b>"._NUKECADSPRICE."</b> : ".formatPrice($curr,$xprice);
       }


Code:
function formatPrice($currency,$valueprice) {
   return $theprice = "$currency ".number_format($valueprice,2);
}


I was modify the type of the field "price" for "text" and "varchar" of the table "nuke_ads_ads", but it was work.

E.g:

Code:
`price` int(11) NOT NULL default '0',


change for:

Code:
`price` varchar(255) NOT NULL default '',
`price` text NOT NULL,


Form Send New Ads

.../modules/NukeC/postads.php

function Index

Code:

   if ($PriceField) {
         echo "<tr><td width=\"25%\" valign=\"top\"><b>"._NUKECADSPRICE."</b></td><td width=\"5\">:</td>\n"
            ."<td>"
            ."<select name=\"AdsCurr\">";
         buildcurrency($sel = "");
         echo "</select>"
            ."<input type=\"text\" name=\"price\" size=\"15\"> "._NUKECCURRSAMPLE."</td></tr>\n";
      } else {
         echo "<input type=\"hidden\" name=\"price\" value=\"\">";
      }


Very Sorry for my english! Embarassed
Find all posts by ibstkView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.666 Seconds - 76 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::