Posts by Smartik

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says



@Smartik: I have tested the script and its working perfect. This is what I was looking for. @Pirenko: The extra code is supposed to be added only in demos (Live preview) for removing the frame but not in the final package which will be given to the buyers.
Yes, but every time that you update the preview theme files (theme update) you need to repeat that code insertion. Anyway, it was just my 2 cents. Cheers :nerdy:
You can make a child theme for the demo ;)
If it’s wordpress, it’s simple, a plugin and just activate for every theme you need. If HTML, you basically have to do additional work to replace all demo images with placeholders, why would it be hard to include a single line? A multi-file search and replace, can do it in a second. ;)
1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

@Smartik, honest question, why would that method be better? Not challenging at all, just looking for your insight mate :) In my case, I pull the list of icons into my theme options and my page builder, so once an icon is chosen it’s saved into an option, or into meta. So the array is only called in certain admin situations anyway and then the value saved by itself.

Because you don’t have to update that list manually with every update of font awesome. In my example this will run everytime, but you can change it a bit and run it only when you want to update the list or write the array in a static file, or anything else.

It probably is not better, it is more flexible(that’s what I should say), and allow to manipulate the code in many ways. Your code is excelent for what it is intended to do, but I’ve just added another solution that allows to get the code in an easy way. :)

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

@ Smartik: I think you should not add any extra code to your themes and templates. And also this seems to apply to all devices and this is not what was intended with this thread.

This is a general example of how you can remove the iframe and redirect to original demo link. Also you should include this in demo only, no need to include it in theme/template itself.

If you want to apply it only for mobile devices then ofcourse it need more work. You can find a script that detects the device written in JS or PHP or anything else and apply it condittionally. It’s up to you.

An example would be:
JS: https://github.com/barisaydinoglu/Detectizr
PHP: https://github.com/dmolsen/Detector

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says
Isn’t it better to update the class name with a single click and save them in DB or a static file?
/**
 * Font Awesome
 *
 * @param string $path font awesomwe css file path
 * @return array
 */
function fontAwesome($path){

    $css = file_get_contents($path);
    $pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/';

    preg_match_all($pattern, $css, $matches, PREG_SET_ORDER);

    $icons = array();
    foreach ($matches as $match) {
        $icons[$match[1]] = $match[2];
    }
    return $icons;

}

// Usage 
// -------------------------------------------------------
$icons = fontAwesome(PATH_TO_CSS . '/font-awesome/css/font-awesome.css');

// this will return an array with the following structure:
// -------------------------------------------------------
array(
...
[fa-glass] => \f000
...
);

// to replace the value with the name class:
// -------------------------------------------------------
$list_i = array();
foreach ($font as $key => $value) {
    $list_i[$key] = $key;
}
//Use it
print_r($list_i);

//To display the name class without prefix and dashes and Uppercase:
// -------------------------------------------------------

//Replace this:
$list_i[$key] = $key;

//with this
$list_i[$key] = ucfirst( str_ireplace(array('fa-', '-'), array('', ' '), $key) );

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

I’ve just added this script in my latest item and I will include it all my comming themes and templates:

Between <head> tags:
<script>if ( top !== self ) top.location.replace( self.location.href );</script>
1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

40 is different for me, never seen a photo like this. :dead: But hey, all are different and some of them are really disgusting.

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

Design + script.

Design should be responsive for tablets and mobile and data needs to be retrieved by URL request, example: domain.com?q=name

Please name your price or send me a PM

I can’t send you a PM because you do not have a contact form in your profile(only authors have). Contact me at: smartik89 @ gmail.com and we can discuss the details.

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says
Do you need:
  • only design?
  • design + engine?

What’s the budget?

1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

Seems like userscripts.org is down( Is there any other way to download the script? Thanks.
http://themeforest.net/forums/thread/introducing-dashboard-plus/71870?page=27#1037226
1320 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+4 more
Smartik
says

Looks like that is a sidebar. Look in the settings of this page if is possible to turn off the sidebar or select another page template(if it has any).

by
by
by
by
by
by