ThemeForest

Posts by MattStrange

234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Hey,

Ive been trying to add a new column that displays the users Twitter ID in the wordpress users area.

So far i have this code and the new “Twitter ID” column shows up but not the information and i don’t know why:

add_filter('manage_users_columns', 'twitter_column');
add_action('manage_users_custom_column',  'show_twitter_columns');

function twitter_column($columns) {
    $columns['twitter'] = 'Twitter ID';
    return $columns;
}

function show_twitter_columns($name) {
    global $post;    
    switch ($name) {
        case 'twitter':
         $user_info = get_userdata($post->post_author);
          echo 'Twitter: ' . $user_info->twitter . "\n";
    }
}

If i execute the following code elsewhere in one of the template files the twitter field for the user shows up correctly…

$user_info = get_userdata(3);
echo 'Username: ' . $user_info->user_login . "\n";
echo 'User level: ' . $user_info->user_level . "\n";
echo 'User ID: ' . $user_info->ID . "\n";
echo 'Twitter: ' . $user_info->twitter . "\n";

Any ideas to get the column information to show?

Cheers Matt

8 months ago in thread Help with manage_users_columns in Wordpress
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Hey,

I’m trying to use the $wpdb class in Wordpress to produce a table that displays how many users have signed up for today and previous days, here is my code:

global $wpdb;
$todaysdate = date("d-M-y");
$todaysusers = '5';
$sql = $wpdb->prepare('INSERT INTO '.$wpdb->prefix.'daily_users(`date`,`users`) VALUES(%s,%s);', $todaysdate, $todaysusers);
$result =    $wpdb->query( $sql );

This works very well and produces a table like this:

ID          DATE          USERS
4           06-Sep-11    5
3           06-Sep-11    5
2           05-Sep-11    2
1           05-Sep-11    2

What i’m having trouble with is being able to update the users field if the date is the same, so using the table above it should have produced this:

ID          DATE          USERS
2           06-Sep-11    10
1           05-Sep-11    4

Hope i have made sense.

Thanks in advanced.

Matt :)

9 months ago in thread Need a little help with $wpdb and php :)
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Hey,

Thanks for the reply. That seems to work well for when the checkbox is clicked.. I made an update to the original code and i need to somehow incorporate your code, if you have a moment take a look at the update, the .click function is used for a table row so using “this.checked” doesn’t seem to work.

http://jsfiddle.net/MattStrange/dh8Fz/28/

Regards Matt

10 months ago in thread Help with jQuery Please :)
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Hey guys,

A bit hard to explain this one, but what i want to accomplish is when this radio button is unchecked i want the number “10” to be shown again.

The demo will show you what i mean…

http://jsfiddle.net/MattStrange/dh8Fz/

So at the moment the number “10” is replaced with “20” when the checkbox is checked which is fine but when you uncheck it the number disappears…

Help appreciated.

Thanks

10 months ago in thread Help with jQuery Please :)
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

I would appreciate some more feedback on the design. Yesterday, we did improve a bit of white space usage but that seems to be not enough. :)

Love it! nice typography and design, :) i suspect your pretty close to being approved, i would perhaps remove the horizontal adspace, top right and maybe give the outer content a margin from the top. Try removing the very top horizontal menu for more white space.

Matt

1 year ago in thread Theme Rejected - Need Feedback
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Somebody one said . .

“It’s the Economy, Stupid!”

And it very well might be. But people still continue to spend money. Good Economy or bad, people still spend!

Don’t want to start chaos or anything, but this isn’t true, my graphics business flopped when clients weren’t buying advertisement

Edit: Congrats dtbaker for 1000 posts :)

1 year ago via ThemeForest | in thread To all people moaning about their sales
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Congrats man! Has anybody told you that you kinda of look like Edward Norton?

1 year ago via ThemeForest | in thread Red paw again:)
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Change

if ($secondaryCount != $countRows) :

to


if ($secondaryCount != ($countRows - 1)) :

Awesome! Works with the changes.

Thankyou :)

1 year ago via ThemeForest | in thread A little help with PHP :)
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Cheers guys for the help, :)

@ParkerAndKent,

Your code produces the following output,

<input name="my-name" value=";;" type="hidden" /> 

@ThemeProvince

Your code seems to stay the same

<input name="my-name" type="hidden" value="6,10.00;10,9.00;" />

Get some sleep guys, its afternoon here, i got all day :)

1 year ago via ThemeForest | in thread A little help with PHP :)
234 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • New Zealand
  • Referred between 1 and 9 users
MattStrange says

Hey guys,

At the moment the following code:

if (!empty($my_meta['metaset'])): $countRows = count($my_meta[metaset]); 
          echo '<input name="my-name" value="';
          for ($ind = 0; $ind < $countRows; $ind ++ ) {
          echo $my_meta[metaset][$ind].','.$my_meta[metasetnumber][$ind].';'; 
          } 
          echo '" type="hidden" />';
  endif;

produces this output

<input name="my-name" value="6,10.00;10,9.00;" type="hidden" />

i need it to produce this output:

<input name="my-name" value="6,10.00;10,9.00" type="hidden" />

Notice the last symbol ”;” after the 9.00 is not there.

How would i get the PHP to output this?

Help appreciated.

Matt

1 year ago via ThemeForest | in thread A little help with PHP :)
by
by
by
by
by