SMF Shop
SMFShop => Requested additions => Topic started by: Hendricius on May 15, 2007, 09:21:37 am
-
A simple icon next to the Amount of gold which people have would be nice in Threads.
This icon looks simple and nice: (http://forums.d2jsp.org/images/gold3.gif).
Another nice feature would be a Quick-Send-Option. You just click that Gold icon then and can quicky send gold to another Person. For security reasons it should ask you for your password tough.
-
in currency settings
either in suffix or prefix
<img src='http://forums.d2jsp.org/images/gold3.gif' />
-
Ah nice thank you, that was easy. Now I want an Hyperlink on the Icon.
"<a href="http://www.d3scene.com/forum/index.php?action=shop"><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>" - I tried that, but it is not working :(
Thanks for helping.
-
<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forum' at line 3
File: /opt/lampp/htdocs/d3scene/forum/Sources/Subs-Post.php
Line: 818
This is the Error which then comes up in both cases.
-
are you sure you used exactly what i put in my reply?
as it works fine for on my
the code you posted and what i posted is different
-
Yep I am sure. I will have a look into the Templates.
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forum' at line 3
File: /opt/lampp/htdocs/d3scene/forum/Sources/Subs-Post.php
Line: 818
This is the Error which then comes up in both cases.
Does your web host have magic quotes turned off (it's an option in php.ini).
Try entering it directly into the database, via phpMyAdmin. The "Currency Prefix" setting is called "shopCurrencyPrefix", and is in the smf_settings table.
-
My php.ini:
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
Changed it, still same Error.
Used this Code: <a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>
Thanks for help.
-
You could try inserting it directly into the database. Open phpMyAdmin, click on the SQL tab, and enter this:
UPDATE smf_settings SET value = "<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>" WHERE variable = "shopCurrencyPrefix";
This should work :)
-
You could try inserting it directly into the database. Open phpMyAdmin, click on the SQL tab, and enter this:
UPDATE smf_settings SET value = "<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>" WHERE variable = "shopCurrencyPrefix";
This should work :)
Thanks for the reply, no it does not :(
Error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forum' at line 3
File: /opt/lampp/htdocs/d3scene/forum/Sources/Subs-Post.php
Line: 818
Where can I place the Icon in the Templates? So it shows directly after the Suffix?
-
Where can I place the Icon in the Templates? So it shows directly after the Suffix?
Oh... my... god! I am such a stupid, and you're a genius! :2funny: ::)
Open Sources/shop/Shop-Subs.php, and find:
// Return amount with prefix and suffix added
return $modSettings['shopCurrencyPrefix'] . $money . $modSettings['shopCurrencySuffix'];
Replace with:
// Return amount with prefix and suffix added
return "<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>" . $modSettings['shopCurrencyPrefix'] . $money . $modSettings['shopCurrencySuffix'];
And then put your prefix back to normal :).
To show it directly after, replace that bit with:
// Return amount with prefix and suffix added
return $modSettings['shopCurrencyPrefix'] . $money . $modSettings['shopCurrencySuffix'] . "<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>";
-
Tried both but unfortunately, the same error. Isn't there a SMF template, where I can simply paste the Icon into ?
-
Strange... This should not be giving an error. What's the exact error message?
Are you sure you set the currency prefix back to its original setting (without the image code)?
Isn't there a SMF template, where I can simply paste the Icon into ?
Nearly every feature in SMFShop has its own template function. You'd need to paste the icon in quite a few places for it to be shown everywhere.
-
in currently settings
either in suffix or prefix
<img src='http://forums.d2jsp.org/images/gold3.gif' />
Where exactly is the location I am looking for - for "in currently settings"?
UPDATE: Okay, I have this working..in a way. When I click on Shop it shows the gold coins EVERYWHERE the word "Token" is displayed. I just want to be able to show it beside their tokens displayed in post on the left-hand side.
UPDATE AGAIN: Putting the line ( Tokens<a href='http://www.jokergrafix.com/index.php?option=com_smf&Itemid=45&action=shop'><img src='http://www.jokergrafix.com/images/stories/gold3.gif'></a>) directly into the Prefiux box it sorted it out for me in their post, but it also keeps a gold coin eside everything else in both the Shop Settings, and in the Shop itself.
-
glad you got it to work
apologies it was suppose to be "Currency"
-
Could you have any image with the <img src='URL HERE' />
Joe