Posts by dtbaker

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

I can now integrate my account verification for item support.

Feel free to share it when you have it working

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

Try something along the lines of:

define('APPLICATION', 'Vanilla');
define('APPLICATION_VERSION', '2.0.16');
define('DS', '/');
define('PATH_ROOT', 'path-to-forum');
ob_start();
require_once(PATH_ROOT.DS.'bootstrap.php');
ob_end_clean(); // clear any header output from vanila
$Session = Gdn::Session();
$Authenticator = Gdn::Authenticator();
if ($Session->IsValid()) {
   $Name = $Session->User->Name;
   echo "You are logged in as $Name";
}else{
  echo "You are not logged in";
}

change path-to-forum above.

I’ve just put this on my site, it works from a php script outside of my vanilla forum:

[link]

enjoy!
dave.

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

I’m sure you could call some of the inbuilt wordpress functions to ‘install’ a plugin just as if the user had uploaded a zip file. This is the code wordpress runs to install from a zip file:

if ( ! current_user_can('install_plugins') )
    wp_die(__('You do not have sufficient permissions to install plugins for this site.'));
check_admin_referer('plugin-upload');
$file_upload = new File_Upload_Upgrader('pluginzip', 'package');
$title = __('Upload Plugin');
$parent_file = 'plugins.php';
$submenu_file = 'plugin-install.php';
require_once('./admin-header.php');
$title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) );
$nonce = 'plugin-upload';
$url = add_query_arg(array('package' => $file_upload->filename ), 'update.php?action=upload-plugin');
$type = 'upload'; //Install plugin type, From Web or an Upload.
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
$upgrader->install( $file_upload->package );
include('./admin-footer.php');

Alternatively you could wack all the plugin/widget code in the functions.php file. I just did a theme that has two custom widgets in the functions.php file, and comes with optional plugin (zip file) that they can install if they want some extra features.

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

Do a few colour options.

Probably best to check with soundcloud to see if they will let you bundle something of theirs in your theme. A lot of people just include a space for existing widgets/plugins in their themes, and provide instructions on where to find / how to install those extra features.

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

Look at re-captcha:

http://code.google.com/apis/recaptcha/docs/wordpress.html

The code is very simple. Could quite easily hack up that wordpress plugin to work directly from your theme.

Or just tell people to install that plugin, and provide some nice css for it.

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

How could I stop/cancel the upload? iframe.setAttribute(‘src’, ‘javascript:false;’);
<a href="javascript:window.frames[0].stop();">cancel upload</a>
or
<a href="javascript:window.frames['h'].stop();">cancel upload</a>
2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

so once they authenticate with the forum on your site, you would like to use that authentication in other parts of the site? eg: a members only area.

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

Yerp going to convert a few of our shop themes over to PrestaShop. Maybe in March after I’ve finished wordpressing them.

2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

You might find it hard to post files by ajax. Post to a hidden iframe instead:

<iframe name="h" src="about:blank" id="h" style="display:none;"></iframe>
<form enctype="mutlipart/form-data" method="post" action="upload_file.php" id="file_form" target="h">
File: <input name="f" type="file" /> <input name="a" value="Attach File" type="submit" /> 
</form>
<form action="submit.php">
<input name="file_urls" id="file_urls" value="" type="hidden" />
Your Name: <input name="name" type="text" /> 
etc..
<input value="Submit Form" type="submit" />
</form>
<script>
function file_has_been_attached(url){
  $('#file_urls').val($('#file_urls').val() + url + ", ");
  alert('The file '+url+' has been attached, please feel free to upload another file');
  $('#file_form')[0].reset();
}
then upload_file.php would do something like this:
// handle file upload of "f" somehow
move_uploaded_file($_FILES['f']['tmp_name'] , '/some/directory/file_name.jpg');
// post back a url to the parent page letting it know a file has been attached
echo "<script> window.parent.file_has_been_attached('/some/url/file_name.jpg'); </script>";
2954 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says
by
by
by
by
by
by