Author Topic: Gold Icon next to Gold Amount in Posts.  (Read 7852 times)

Hendricius

  • Guest
Gold Icon next to Gold Amount in Posts.
« 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: .

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.

Offline feeble

Re: Gold Icon next to Gold Amount in Posts.
« Reply #1 on: May 15, 2007, 11:33:18 am »
in currency settings

either in suffix or prefix
Code: [Select]
<img src='http://forums.d2jsp.org/images/gold3.gif' />
« Last Edit: June 11, 2007, 08:21:21 pm by feeble »

Hendricius

  • Guest
Re: Gold Icon next to Gold Amount in Posts.
« Reply #2 on: May 15, 2007, 06:37:04 pm »
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.

Offline feeble

Re: Gold Icon next to Gold Amount in Posts.
« Reply #3 on: May 15, 2007, 06:52:40 pm »
Code: [Select]
<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>

Hendricius

  • Guest
Re: Gold Icon next to Gold Amount in Posts.
« Reply #4 on: May 16, 2007, 05:33:09 am »
Quote
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.

Offline feeble

Re: Gold Icon next to Gold Amount in Posts.
« Reply #5 on: May 17, 2007, 12:39:29 pm »
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

Hendricius

  • Guest
Re: Gold Icon next to Gold Amount in Posts.
« Reply #6 on: May 17, 2007, 10:55:24 pm »
Yep I am sure. I will have a look into the Templates.

Offline Daniel15

Re: Gold Icon next to Gold Amount in Posts.
« Reply #7 on: May 18, 2007, 08:22:42 pm »
Quote
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.

Hendricius

  • Guest
Re: Gold Icon next to Gold Amount in Posts.
« Reply #8 on: May 20, 2007, 12:23:55 am »
My php.ini:
Code: [Select]
; 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:
Code: [Select]
<a href='http://www.d3scene.com/forum/index.php?action=shop'><img src='http://forums.d2jsp.org/images/gold3.gif' /></a>
Thanks for help.


Offline Daniel15

Re: Gold Icon next to Gold Amount in Posts.
« Reply #9 on: May 26, 2007, 10:48:29 am »
You could try inserting it directly into the database. Open phpMyAdmin, click on the SQL tab, and enter this:
Code: [Select]
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 :)

Hendricius

  • Guest
Re: Gold Icon next to Gold Amount in Posts.
« Reply #10 on: May 26, 2007, 04:56:57 pm »
You could try inserting it directly into the database. Open phpMyAdmin, click on the SQL tab, and enter this:
Code: [Select]
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:
Quote
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?

Offline Daniel15

Re: Gold Icon next to Gold Amount in Posts.
« Reply #11 on: May 26, 2007, 07:20:26 pm »
Quote
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:
Code: [Select]
// Return amount with prefix and suffix added
return $modSettings['shopCurrencyPrefix'] . $money . $modSettings['shopCurrencySuffix'];
Replace with:
Code: [Select]
// 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:
Code: [Select]
// 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>";

Hendricius

  • Guest
Re: Gold Icon next to Gold Amount in Posts.
« Reply #12 on: May 31, 2007, 12:04:00 am »
Tried both but unfortunately, the same error. Isn't there a SMF template, where I can simply paste the Icon into ?

Offline Daniel15

Re: Gold Icon next to Gold Amount in Posts.
« Reply #13 on: June 02, 2007, 05:21:49 pm »
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)?

Quote
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.

Offline Joker Grafix

Re: Gold Icon next to Gold Amount in Posts.
« Reply #14 on: June 11, 2007, 08:01:46 am »
in currently settings

either in suffix or prefix
Code: [Select]
<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.
« Last Edit: June 11, 2007, 08:33:11 am by Joker Grafix »