Gustav
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Plugin who is viewing this page?Something like this sorry made it in paint.exe
Forum: Developing with WordPress
In reply to: Get current user/logged in descriptionThanks it worked!
Forum: Developing with WordPress
In reply to: wp_get_archives doesn’t take effect from css or htmlTest with important?
<ul class="dropdown-menu" style="list-style:none;color:#000 !important" aria-labelledby="navbarDropdown">'
Forum: Plugins
In reply to: [Responsive Menu - Create Mobile-Friendly Menu] Dropdown from abowBumping this thread.
How can i make so it drops down only 50%?
I see only width option not height.Thanks!
Forum: Developing with WordPress
In reply to: Get special specific field from profileWell if it hasnt a special $key then what?
Forum: Fixing WordPress
In reply to: Can wp search only in one or two category(in database)?Yes its possible.
If you are searching for a plugin.
Just search for a plugin “category search” or something simular. Ajax search.https://www.ads-software.com/plugins/tags/category-search/
https://www.ads-software.com/plugins/simple-category-search/
https://www.ads-software.com/plugins/category-search/- This reply was modified 6 years, 5 months ago by Gustav.
Forum: Fixing WordPress
In reply to: Autoptimize plugin for WordPressTook a fast look with chrome and firefox from PC dont see any CSS errors so far.
Forum: Fixing WordPress
In reply to: Link logo to shop pageShow us the code of header.php or index.php or the file where that logo is.
- This reply was modified 6 years, 5 months ago by Gustav.
Forum: Developing with WordPress
In reply to: Insert data into biography when auto registeringI solved it somehow.
I just tested and tested and tested and i solved it.
Thanks for the help.#14 answer helped me out alot.
Forum: Developing with WordPress
In reply to: Insert data into biography when auto registeringWell im not good @ programming.
Sh*t it didnt work as aspected.It removed all the lines bellow and didnt echo the result in that line.
<td><?php echo getSteamId32($steamid64); ?></td>
I dont understand the problem.
Before: https://i.imgur.com/0GPstpk.png
After: https://i.imgur.com/LuqwUu0.pngForum: Developing with WordPress
In reply to: Insert data into biography when auto registeringNothing works but lets try last time.
I have this in the plugin file which prints out steam_steamid profile field and the value.
<td><?php echo esc_attr(get_the_author_meta( 'steam_steamid', $user->ID )); ?></td>
A small function.
$steamid64 = $user_meta->steam_steamid; //YOUR STEAM ID 64 echo getSteamId32($steamid64);
How can i do something like this in a correct way?
$steamid64 = esc_attr(get_the_author_meta( 'steam_steamid', $user->ID )); //YOUR STEAM ID 64 echo getSteamId32($steamid64);
And then echo it correctly.
<td><?php echo getSteamId32($steamid64); ?></td>
Forum: Developing with WordPress
In reply to: Insert data into biography when auto registeringOriginal. This shows the original value.
<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></br><center><font size="2"><?php bp_member_name();?></font></center><iframe style="margin-left:4px;" frameBorder="0" width="28" height="28" scrolling="no" src="https://website?sid=<?php $user_meta = get_userdata(bp_get_member_user_id());echo($user_meta->steam_steamid);?>"frameborder="0"></iframe></a>
I want the new result to echo here. (HERE) (Its in another div)
<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></br><center><font size="2"><?php bp_member_name();?></font></center><iframe style="margin-left:4px;" frameBorder="0" width="28" height="28" scrolling="no" src="https://website?sid=<?php $user_meta = get_userdata(bp_get_member_user_id());echo(HERE);?>"frameborder="0"></iframe></a>
Forum: Developing with WordPress
In reply to: Insert data into biography when auto registeringOk lets try to go around this.
This code prints in/out steam_steamid field in that specific profile field.
<td><?php echo esc_attr(get_the_author_meta( 'steam_steamid', $user->ID )); ?></td>
Can i change the output of thatt field with this code somehow?
<?php ///$steamid64 = $user_meta->steam_steamid; //YOUR STEAM ID 64 ///echo getSteamId32($steamid64); $steamid64 = $user_meta->steam_steamid; //YOUR STEAM ID 64 $steamid32 = getSteamId32($steamid64); $user_meta->steam_steamid = $steamid32; wp_update_user($user_meta); function getSteamID64($id) { if (preg_match('/^STEAM_/', $id)) { $parts = explode(':', $id); return bcadd(bcadd(bcmul($parts[2], '2'), '76561197960265728'), $parts[1]); } elseif (is_numeric($id) && strlen($id) < 16) { return bcadd($id, '76561197960265728'); } else { return $id; } } function parseInt($string) { // return intval($string); if(preg_match('/(\d+)/', $string, $array)) { return $array[1]; } else { return 0; } } function getSteamId32($id){ // Convert SteamID64 into SteamID $subid = substr($id, 4); // because calculators are fags $steamY = parseInt($subid); $steamY = $steamY - 1197960265728; //76561197960265728 if ($steamY%2 == 1){ $steamX = 1; } else { $steamX = 0; } $steamY = (($steamY - $steamX) / 2); $steamID = "STEAM_0:" . (string)$steamX . ":" . (string)$steamY; return $steamID; } ?>
Other option.
This prints out steam_steamid from current profile.
<?php $user_meta = get_userdata(bp_get_member_user_id());echo($user_meta->steam_steamid);?>
Can i manipulate steam_steamid so it prints out steam_steamid after it has been handled by this code?
<?php ///$steamid64 = $user_meta->steam_steamid; //YOUR STEAM ID 64 ///echo getSteamId32($steamid64); $steamid64 = $user_meta->steam_steamid; //YOUR STEAM ID 64 $steamid32 = getSteamId32($steamid64); $user_meta->steam_steamid = $steamid32; wp_update_user($user_meta); function getSteamID64($id) { if (preg_match('/^STEAM_/', $id)) { $parts = explode(':', $id); return bcadd(bcadd(bcmul($parts[2], '2'), '76561197960265728'), $parts[1]); } elseif (is_numeric($id) && strlen($id) < 16) { return bcadd($id, '76561197960265728'); } else { return $id; } } function parseInt($string) { // return intval($string); if(preg_match('/(\d+)/', $string, $array)) { return $array[1]; } else { return 0; } } function getSteamId32($id){ // Convert SteamID64 into SteamID $subid = substr($id, 4); // because calculators are fags $steamY = parseInt($subid); $steamY = $steamY - 1197960265728; //76561197960265728 if ($steamY%2 == 1){ $steamX = 1; } else { $steamX = 0; } $steamY = (($steamY - $steamX) / 2); $steamID = "STEAM_0:" . (string)$steamX . ":" . (string)$steamY; return $steamID; } ?>
- This reply was modified 6 years, 5 months ago by Gustav.
Forum: Developing with WordPress
In reply to: Insert data into biography when auto registeringForum: Developing with WordPress
In reply to: Insert data into biography when auto registeringI realy dont know.
$user_meta = get_userdata(bp_get_member_user_id());echo($user_meta->steam_steamid) $user_meta->steam_steamid
steam_steamid is the field
I will check that out but dont know if i can make it to work.
- This reply was modified 6 years, 5 months ago by Gustav.