Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Cant find the discussions page

Can someone tell me how I can edit the main https://vizionmc.us/discussions page I need to add some code from google.com Structured Data and I cant find the page?

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Basically you have 2 options:

    1) create a custom theme of your own
    2) write a plugin

    Do not change any of the core files!

    1) Read about custom themes (it is not much more than copying a folder and customizing the content of the enclosed "about.php" file). Create a file called class.yourthemenamehooks.php (if it does not exist) and add the following to it:

    <?php defined('APPLICATION') or die;
    
    class YourThemeNameThemeHooks implements Gdn_IPlugin {
    
        public function setup () {
        }
        public function onDisable () {
        }
    
        public function discussionsController_render_before ($sender) {
            $sender->addJsFile('thenameofyourjsfile.js', 'themes/YourThemeName');
        }
    
    }
    

    2) Create a plugin and save it like that /plugins/ResultOfPermanentNagForGoogleStructureDataHelp/class.resultofpermanentnagforgooglestructuredatahelp.plugin.php:

    <?php defined('APPLICATION') or die;
    
    $PluginInfo['ResultOfPermanentNagForGoogleStructureDataHelp'] = array(
      'Name' => 'ResultOfPermanentNagForGoogleStructureDataHelp',
      'Description' => 'ResultOfPermanentNagForGoogleStructureDataHelp',
      'Version' => '0.1',
      'Author' => 'R_J'
    );
    
    class ResultOfPermanentNagForGoogleStructureDataHelpPlugin extends Gdn_Plugin {
        public function discussionsController_render_before ($sender) {
            $sender->addJsFile('thenameofyourjsfile.js', 'plugins/ResultOfPermanentNagForGoogleStructureDataHelp');
        }
    }
    

    You can change the name, of course ;)

    Save the js file in a subfolder of your theme/plugin called "js"

  • Options

    I'm about to try thanks for all the help :love:

  • Options
    edited April 2015

    Where would I put the google Structured Data code?

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Don't know. How does it look like? Do you have a link to a Google "how to" page?

  • Options

    The way I post the code was causing my website to not work so I had to remove it for now this is how its looks:
    http://pastebin.com/VWapuGWP

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    When you said "code" I thought you were speaking of javascript. Sorry, my fault.

    So you want to insert html, but what you are trying to do there is plain wrong. Where would you expect that to see in the HTML source code? You have a div element above a meta element. That's not allowed. divs can only be in the body and meta only in the head of a html document.

  • Options

    I was try use this thing call http://www.webdesigners-directory.com/html/rich-snippet-structured-data-creator.cfm so I can get my Structured data to work on webmaster tools.
    https://i.imgur.com/114ZRJ9.png

  • Options

    @VizionMc said:
    I was trying use this thing call http://www.webdesigners-directory.com/html/rich-snippet-structured-data-creator.cfm so I can get my Structured data to work on webmaster tools.
    https://i.imgur.com/114ZRJ9.png

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Don't worry. I was wearing that stupid tinfoil hat for 2 years until I realized that not every advice you can get in the net is worth reading... http://zapatopi.net/afdb/

  • Options

    um?

  • Options

    Thanks for your time RJ.
    https://prntscr.com/6zlve3

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Sometimes you find bad advices on the net. The markup that this tool generates is not valid. I can nevertheless show you how to implement it on your page, but I wouldn't now where, since it is mixture of what cannot be part of htmls head and what is part of htmls body tag.

    Showing me a picture of a google video doesn't help, since I will not start googling about "structured data how to inplement" for you.

  • Options

    No it start it to work I don't know how but its working lol that picture was it working thats why I said thanks for your time.

Sign In or Register to comment.