0
Welcome Guest! Login
0 items Join Now

RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    • Rub's Avatar
    • Rub
    • Elite Rocketeer
    • Posts: 566
    • Thanks: 0
    • Electronics Engineer - Medical Molding

    RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    Posted 13 years 4 months ago
    • THIS IS ONLY FOR JOOMLA 1.7

      Hi to all,

      I noticed a lot o people experiencing issues on how to setup the rokcomments to properly work with Facebook and on how to change the color theme or color scheme(dark or light).

      HOW TO SETUP FACEBOOK DEVELOPERS APPPLICATION

      Below you could find helpful information on how to properly setup the facebook developer tools. https://developers.facebook.com/apps

      This are the settings I used to make my application properly work, not only with Rokcomments but with any other of the available Facebook scripts, wall, tabs, etc.
      This image is hidden for guests.
      Please log in or register to see it.

      HOW TO ADD TO YOUR ROKCOMMENTS SETTINGS A DROP DOWN MENU FOR FACEBOOK THEME SELECTION
      This image is hidden for guests.
      Please log in or register to see it.

      If you are interested on how to add this option to your rokcomments settings you need to edit the rokcomments.php and rokcomments.xml located in your server folder "public_html/plugins/content/rokcomments" , but before I would strongly recommend to make a backup of the existing files.


      You can either manually change the xml and php or just download the zip files inlcuded at the bottom of this POST
      .

      ROKCOMMENTS.PHP
      1. Line 27 - Insert line - Add the following
        var $theme;
      2. Line 98-99 - Insert line - Add the following
        // Facebook theme 
                $this->theme = $pluginParams->get('fb-theme','dark');
      3. Line 303 - Change from this
        <div class="fb-comments" data-href="{post-url}" data-num-posts="{postcount}" data-width="{width}" <div class="fb-comments" data-href="home.rhuk.net" data-num-posts="5" data-width="500" data-colorscheme="light"></div>';
         
                    }
        TO THIS
        <div class="fb-comments" data-href="{post-url}" data-num-posts="{postcount}" data-width="{width}" data-colorscheme="{theme}" <div class="fb-comments" data-href="home.rhuk.net" data-num-posts="5" data-width="500" data-colorscheme="dark"></div>';
         
                    }
      4. Line 367 - Change from this
               $search = array('{subdomain}', '{post-id}', '{post-url}', '{post-path}', '{devmode}', '{rk-icon}', '{domain}', '{account}', '{width}', '{postcount}', '{host}');
         
        TO THIS
             $search = array('{subdomain}', '{post-id}', '{post-url}', '{post-path}', '{devmode}', '{rk-icon}', '{domain}', '{account}', '{width}', '{postcount}', '{theme}', '{host}');
         
      5. Line 368 - Change from this
        $replace = array($this->subdomain, $this->postid, $this->url, $this->path, $this->devmode, $this->commenticon, $this->domain, $this->account, $this->width, $this->postcount, $this->host);
        TO THIS
        $replace = array($this->subdomain, $this->postid, $this->url, $this->path, $this->devmode, $this->commenticon, $this->domain, $this->account, $this->width, $this->postcount, $this->theme, $this->host);

      ROKCOMMENTS.XML

      Add the following on line 146.
      <field name="fb-theme" type="list" default="1" label="Facebook Theme" description="Select the desire facebook theme">
                          <option value="dark">Dark</option>
                          <option value="light">Light</option>
                       </field>
       

      I PM this post to Andy Miller and Kat05 so they can check the proposed changes and if they like it add this new feature to the next rokcomment release. Feel free to use it.

      If you are not familiar on how to modify the files mentioned above, you can download the following files and unzip the files on the rokcomments folder, but before any modification make a backup copy of the existing files in your folder "public_html/plugins/content/rokcomments"

      This attachment is hidden for guests. Please log in or register to see it.


      Hope this information is helpful
      Rub
    • Last Edit: 13 years 4 months ago by Rub.
    • Rub

      Steve Jobs "We will miss you"
      We are volunteers - Don't be rude
    • Rub's Avatar
    • Rub
    • Elite Rocketeer
    • Posts: 566
    • Thanks: 0
    • Electronics Engineer - Medical Molding

    Re: RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    Posted 13 years 4 months ago
    • FOR JOOMLA 1.5

      For Joomla 1.5 is very similar as the 1.7 version, code is a little bit different but in general is the same idea.

      You can either manually change the xml and php or just download the zip files included at the bottom of this POST. Before any modification make a backup copy of the existing files in your folder "/public_html/plugins/content and find the rokcomments.php and rokcomments.xml"


      ROKCOMMENTS.PHP
      1. Line 67 - Insert line - Add the following
        $theme = $pluginParams->get('fb-theme','dark');
      2. Line 153 - Change from this
        $search     = array('{subdomain}','{post-id}','{post-url}','{post-path}','{devmode}','{rk-icon}','{domain}','{account}', '{width}', '{postcount}', '{theme}', '{host}');
        TO THIS
        $search     = array('{subdomain}','{post-id}','{post-url}','{post-path}','{devmode}','{rk-icon}','{domain}','{account}', '{width}', '{postcount}', '{host}');
      3. Line 154 - Change from this
        $replace    = array($subdomain,$postid,$url,$path,$devmode,$commenticon,$domain,$account,$width,$postcount,$host);
        TO THIS
        $replace    = array($subdomain,$postid,$url,$path,$devmode,$commenticon,$domain,$account,$width,$postcount,$theme,$host);
      4. Line 251 - Change from this
        <div class="fb-comments" data-href="{post-url}" data-num-posts="{postcount}" data-width="{width}" <div class="fb-comments" data-href="home.rhuk.net" data-num-posts="5" data-width="500" data-colorscheme="light"></div>';
         
                }
        TO THIS
        <div class="fb-comments" data-href="{post-url}" data-num-posts="{postcount}" data-width="{width}" data-colorscheme="{theme}" <div class="fb-comments" data-href="home.rhuk.net" data-num-posts="5" data-width="500" data-colorscheme="light"></div>';
         
                }

      ROKCOMMENTS.XML

      Add the following on line 59. After last Facebook parameter
      <param name="fb-theme" type="list" default="1" label="Facebook Theme" description="Select the desire facebook theme">
                          <option value="dark">Dark</option>
                          <option value="light">Light</option>
                       </param>
       

      If you are not familiar on how to modify the files mentioned above, you can download the following files and unzip the files on the rokcomments folder, but before any modification make a backup copy of the existing files in your folder "/public_html/plugins/content" and find the rokcomments.php and rokcomments.xml
      This attachment is hidden for guests. Please log in or register to see it.
    • Rub

      Steve Jobs "We will miss you"
      We are volunteers - Don't be rude
    • Rub's Avatar
    • Rub
    • Elite Rocketeer
    • Posts: 566
    • Thanks: 0
    • Electronics Engineer - Medical Molding

    Re: RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    Posted 13 years 3 months ago
    • Any thoughts?
    • Rub

      Steve Jobs "We will miss you"
      We are volunteers - Don't be rude
    • Rub's Avatar
    • Rub
    • Elite Rocketeer
    • Posts: 566
    • Thanks: 0
    • Electronics Engineer - Medical Molding

    Re: RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    Posted 13 years 3 months ago
    • :D :D :D
    • Rub

      Steve Jobs "We will miss you"
      We are volunteers - Don't be rude
    • Rub's Avatar
    • Rub
    • Elite Rocketeer
    • Posts: 566
    • Thanks: 0
    • Electronics Engineer - Medical Molding

    Re: RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    Posted 13 years 3 months ago
    • Works without problems on J2.5
    • Rub

      Steve Jobs "We will miss you"
      We are volunteers - Don't be rude
    • Areiva's Avatar
    • Areiva
    • Newbie
    • Posts: 5
    • Thanks: 0

    Re: RokComments - Add Facebook Theme Selector Joomla 1.5 -1.7

    Posted 13 years 3 months ago
    • Thanks for this info!!!

Time to create page: 0.093 seconds