News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMFShop - Shop MOD

Started by SMFHacks.com Team, December 27, 2004, 06:46:17 AM

Previous topic - Next topic

Alisha

#120
Quote from: [Unknown] on January 22, 2005, 10:54:29 PM
<input type='text' name='username' size='50'>

That needs to have id='username' on it too, for findmembers to access it properly.

-[Unknown]

    function getUseInput() {
        global $context, $settings, $options, $scripturl, $modSettings, $txt;
        return "User's name: <input type='text' name='username' id='username size='50'>";
        echo '
               <td class="smalltext">
               <a href="', $scripturl, '?action=findmember;input=username;quote=1;sesc=', $context['session_id'], '" onclick="return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['find_members'], '" /></a> ', $txt[748], '
               </td>';
    }


Change made and still the same problem, Nothing shows up at all, No link, no find members text. Along with no errors.

Quoteyou're echoing rather than returning... read comments in Sources/shop/items/testitem2.php for more information

I am returning the input field, and echoing the Find Users link. How would I return the find users link?

Daniel15

Quote from: Alisha on January 22, 2005, 11:02:35 PM
Quote from: [Unknown] on January 22, 2005, 10:54:29 PM
<input type='text' name='username' size='50'>

That needs to have id='username' on it too, for findmembers to access it properly.

-[Unknown]

    function getUseInput() {
        global $context, $settings, $options, $scripturl, $modSettings, $txt;
        return "User's name: <input type='text' name='username' id='username size='50'>";
        echo '
               <td class="smalltext">
               <a href="', $scripturl, '?action=findmember;input=username;quote=1;sesc=', $context['session_id'], '" onclick="return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['find_members'], '" /></a> ', $txt[748], '
               </td>';
    }


Change made and still the same problem, Nothing shows up at all, No link, no find members text. Along with no errors.

Quoteyou're echoing rather than returning... read comments in Sources/shop/items/testitem2.php for more information

I am returning the input field, and echoing the Find Users link. How would I return the find users link?

you need to return everything (ie. you need to return the input firld AND the find users link. I haven't tried that but it should work

and you forgot to close the quote in the input field:
<input type='text' name='username' id='username size='50'>
should be
<input type='text' name='username' id='username'size='50'>
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Alisha

    function getUseInput() {
        global $context, $settings, $options, $scripturl, $modSettings, $txt;
        return "User's name: <input type='text' name='username' id='username' size='50'>";
        return  '
               <td class="smalltext">
               <a href="', $scripturl, '?action=findmember;input=username;quote=1;sesc=', $context['session_id'], '" onclick="return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['find_members'], '" /></a> ', $txt[748]';
               </td>';
    }


Parse error: parse error, unexpected ',' in /home/.cadence/msalisha/dancedancekc.com/Forums/Sources/shop/items/PurchaseSandBags.php on line 28

I do not see anything extra or out of place? 

Daniel15

Quote from: Alisha on January 22, 2005, 11:22:31 PM
    function getUseInput() {
        global $context, $settings, $options, $scripturl, $modSettings, $txt;
        return "User's name: <input type='text' name='username' id='username' size='50'>";
        return  '
               <td class="smalltext">
               <a href="', $scripturl, '?action=findmember;input=username;quote=1;sesc=', $context['session_id'], '" onclick="return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['find_members'], '" /></a> ', $txt[748]';
               </td>';
    }


Parse error: parse error, unexpected ',' in /home/.cadence/msalisha/dancedancekc.com/Forums/Sources/shop/items/PurchaseSandBags.php on line 28

I do not see anything extra or out of place? 
change the commas (,) to dots (.). Commas are used with echo to specify additional stuff to output, but with other functions, you need to use concatenation (the . character).... if you understood any of that 
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Alisha

Quote from: daniel15 on January 22, 2005, 11:33:01 PM
Quote from: Alisha on January 22, 2005, 11:22:31 PM
    function getUseInput() {
        global $context, $settings, $options, $scripturl, $modSettings, $txt;
        return "User's name: <input type='text' name='username' id='username' size='50'>";
        return  '
               <td class="smalltext">
               <a href="', $scripturl, '?action=findmember;input=username;quote=1;sesc=', $context['session_id'], '" onclick="return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" border="0" alt="', $txt['find_members'], '" /></a> ', $txt[748]';
               </td>';
    }


Parse error: parse error, unexpected ',' in /home/.cadence/msalisha/dancedancekc.com/Forums/Sources/shop/items/PurchaseSandBags.php on line 28

I do not see anything extra or out of place? 
change the commas (,) to dots (.). Commas are used with echo to specify additional stuff to output, but with other functions, you need to use concatenation (the . character).... if you understood any of that 

    function getUseInput() {
        global $context, $settings, $options, $scripturl, $modSettings, $txt;
        return "User's name: <input type='text' name='username' id='username' size='50'>
        <a href="'. $scripturl. '?action=findmember;input=username;quote=1;sesc='. $context['session_id']. '" onclick="return reqWin(this.href, 350, 400);"><img src="'. $settings['images_url']. '/icons/assist.gif" border="0" alt="'. $txt['find_members']. '" /></a> '. $txt[748]';
               </td>";
    }


Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/dancedancekc.com/Forums/Sources/shop/items/PurchaseSandBags.php on line 26

Squeakypants

#125
One problem: Code inputs. When doing anything that requires input, someone could easily put something in that could destroy the site (if it were going into a database, for example, someone could put DROP). Though, this is only when it is a number input. For example, I put "$this=5" deposit to the bank. Here's what come up:
QuoteUnknown column '$this' in 'field list'
File: /homepages/**/d*******/htdocs/****/forums/Sources/shop/Shop.php
Line: 451

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.1, whereas your database is at version SMF 1.0. It is recommended that you execute the latest version of upgrade.php.

If I had put DROP, bye-bye database.

Alisha

Quote from: Squeakypants on January 23, 2005, 12:20:04 AM
One problem: Code inputs. When doing anything that requires input, someone could easily put something in that could destroy the site (if it were going into a database, for example, someone could put DROP). Though, this is only when it is a number input. For example, I put "$this=5" deposit to the bank. Here's what come up:
QuoteUnknown column '$this' in 'field list'
File: /homepages/**/d*******/htdocs/****/forums/Sources/shop/Shop.php
Line: 451

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.1, whereas your database is at version SMF 1.0. It is recommended that you execute the latest version of upgrade.php.

If I had put DROP, bye-bye database.

Figures... 

Jerry

Quote from: Alisha on January 22, 2005, 11:37:03 PM
function getUseInput() {
global $context, $settings, $options, $scripturl, $modSettings, $txt;
return "User's name: <input type='text' name='username' id='username' size='50'>
<a href="'. $scripturl. '?action=findmember;input=username;quote=1;sesc='. $context['session_id']. '" onclick="return reqWin(this.href, 350, 400);"><img src="'. $settings['images_url']. '/icons/assist.gif" border="0" alt="'. $txt['find_members']. '" /></a> '. $txt[748]';
</td>";
}


Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/dancedancekc.com/Forums/Sources/shop/items/PurchaseSandBags.php on line 26

User's name: <input type='text' name='username' id='username' size='50'> needs to be something like this :)
User\'s name: <input type=\'text\' name=\'username\' id=\'username\' size=\'50\'> This should probably fix that problem.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Alisha

The input box isn't my problem, getting the "Find Users" link to show up like in the Send PM Box. Where you can click and search for a member to use this action on.

I either error out, or like right now its invisible. Looks like it should be there, but it isn't showing up.

LordAnki

Okay, Nobody has bothered to help me with this parse error.

Quote
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/fm/public_html/forums/Sources/Subs.php on line 1607

Here is lines 1606-1610


}
$context['random_news_line'] ']']']= $context['news_lines'][rand(0, count($context['news_lines']) - 1)];

if (!$user_info['is_guest'])
{


NOW can someone please help me out. Thank you.
[nofollow]

Alisha

Quote from: LordAnki on January 23, 2005, 12:01:09 PM
Okay, Nobody has bothered to help me with this parse error.

Quote
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/fm/public_html/forums/Sources/Subs.php on line 1607




}
$context['random_news_line'] ']']']= $context['news_lines'][rand(0, count($context['news_lines']) - 1)];

if (!$user_info['is_guest'])
{


NOW can someone please help me out. Thank you.

I am sorry I wish I could help you!  I have no idea.  I do wish I could help you!  You installing the shop?  Manually?

LordAnki

[nofollow]

Alisha

Quote from: LordAnki on January 23, 2005, 03:54:47 PM
yes manually.

Ok first what version are you installing? Fresh, .02 or .02 - 1 update?

Also, I maybe wrong on here, but I looked over the package install and that error makes me think you have an Extra { or ; someplace or one that isn't needed.  You need to go back to where you made the changes and make sure you didn't miss anything.  I used the package manager to install it, so I am not very versed on what was done or needs to be done to install it.  Although, I will try to help you. 

When you are checking grab a fresh copy of the files you changed and compare them on or around the lines you changed. What should be there, what you should have there, and what IS there.  This is the only way I know for find these simple type parse errors.

I do believe that this is because you miss copied something when you made the changes.  Missed a little { on a line or something like that. 

Also, if you use ConTEXT from ConTEXT.CX  this will be a whole lot easier on you.  It has a compare feature.

LordAnki

fresh install i think v.02 or w/e

I might just try and do the package manager.
[nofollow]

Alisha

Quote from: LordAnki on January 23, 2005, 05:12:29 PM
fresh install i think v.02 or w/e

I might just try and do the package manager.

Well if you do use the manager with a partial errored install, it MIGHT, cause more of the problem.  See you will have a Partial installed error, and in places that the files should be you will have a proper. This can cause more errors than you have now.  I have been down this road before :) its not a happy thing.

LordAnki

well if someone who knew more about php and errors and stuff like that could help me maybe i wouldn't have to uninstall everything and reinstall and blah blah blah. No offence Alisha. I'm grateful for hte help u are giving me.
[nofollow]

Alisha

Quote from: LordAnki on January 23, 2005, 06:01:36 PM
well if someone who knew more about php and errors and stuff like that could help me maybe i wouldn't have to uninstall everything and reinstall and blah blah blah. No offence Alisha. I'm grateful for hte help u are giving me.

Well I wish I could be of more help.  I am just learning PHP myself. 

Daniel15

#137
i'm really sorry LordAnki but i must have missed your post

looking at the code you posted...

}
$context['random_news_line'] ']']']= $context['news_lines'][rand(0, count($context['news_lines']) - 1)];

if (!$user_info['is_guest'])
{


that has nothing to do with the shop... try removing the ']']']... that might work

again, sorry for not replying sooner, but sometimes when i look at this topic, there might be 15-20 replies all coming in at the same time, and i might have missed yours

please reply if you have any more problems, but i'll be busy this week since school starts next week here in Australia... I can help you on weekends though

--daniel15
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

[Unknown]

That's something Dreamweaver does... darn thing.

-[Unknown]

Alisha

ok, with the item Dan made for the shop where you can Change another members title you can change their title, although, so can they change it back in the profile.  So I figured I would just disable in the admin section. Well that made them vanish.

Any ideas to eliminate this problem?

Thanks!

Advertisement: