Please upgrade here. These earlier versions are no longer being updated and have security issues.

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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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"


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

  • edited April 2015

    Where would I put the google Structured Data code?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

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


  • 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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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.


  • 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

  • @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

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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/


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

    R_J
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    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.


    VizionStudios
  • 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.