MyBB Community Forums

Full Version: Bitcoin value plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to add as like

 [Image: y00AzN.png]style crypto currency value on the top of my forum. Any plugin or method for this.

Thank you. [Image: 1f496.svg]

Please answer clearly for newbie
I look for answer, what a bad support, oh god!
I coded a small plugin for you, modify it based on your liking.
It will currently display BTC price wherever you use the below variable in template :-
$btcprice
Added github link
https://github.com/WallBB/BTCPrice-MyBB

Also do not give bad name to community just because you didn't get a fast reply. Everyone here try their best.
thanks. I sent to PM

I have no idea writing codes. We need easy solving. Please clearly telling which code copy/paste and where.
(2018-02-19, 07:47 AM)watch my blink! Wrote: [ -> ]thanks. I sent to PM

I have no idea writing codes. We need easy solving. Please clearly telling which code copy/paste and where.
It is quite simple to use, just install the plugin and edit templates of your theme.
Suppose you want to add it like in above image, then go to header template and add $btcprice there.

You will see the BTC price.
I will check your PM as well.
https://i.imgur.com/21D8SKv.png

is the error I got when trying to add this.
Thanks for plugin, it works great!
But still i have a question: what i have to add in .php to show eth /zcash etc. values too?
Thanks alot ! Smile
don't understand your question at all what u mean

(2018-04-25, 11:40 AM)berilslv Wrote: [ -> ]Thanks for plugin, it works great!
But still i have a question: what i have to add in .php to show eth /zcash etc. values too?
Thanks alot ! Smile

don't understand your question unless u are tallking zcash from table name

(2018-04-25, 11:58 AM)rocket Wrote: [ -> ]don't understand your question at all what u mean

(2018-04-25, 11:40 AM)berilslv Wrote: [ -> ]Thanks for plugin, it works great!
But still i have a question: what i have to add in .php to show eth /zcash etc. values too?
Thanks alot ! Smile

don't understand your question unless u are tallking zcash from table name


think i understand u now your sql query

should look like this if i have correct tables and columns

SELECT username, zcash FROM mybb_users zcash WHERE usergroup=4

note i am listing username and zcash value only

php source


<!DOCTYPE html>
<html>
<head>
<style>
body {
position:absolute;
height:1200px;
color: #dfe5ec;
background-color: rgba(35, 35, 35, 0.60);

</style>
</head>
<body>

<?php
$servername = "localhost";
$username = "from inc/config.php";
$password = "from inc/config.php";
$dbname = "from inc/config.php";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT username, zcash FROM mybb_users zcash WHERE usergroup=4";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
echo "banned users: ";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<font color=red size=4><br>" . $row["username"]." " . $row["zcash"]. "<br></font>";
}

} else {
echo "0 results";
}

$conn->close();
?>

</body>
</html>
Hi Mate!
Thanks for answer!
My english is not that good it may be a problem to understand me correctly. Toungue
What i want to ask is: Right now it's displaying BTC price! Great! But i would like to display other values too, like ethereum/zcash/monero/etc. in the same plugin.
What i have to add in SQL/.PHP to add other currencies in this plugin?
Thanks alot! And have a nice day! Smile
would need the plugin that u are talking about to see how it is stored in the database
berilslv