Not signed in (Sign In)

Categories

Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorCrazyotaku
    • CommentTimeAug 30th 2006
     # 1
    Hi as some of you probably know by now i'm trying to turn my forum into a website. Well i'm able to make new custom php pages that have all the features of the regular pages (like the sidebar and tabs, add-ons, etc.) but I can't figure out how to customize the body of the page in html. Here is one of my custom pages I have made. Note this is still in very early testing phase so if Im going about this all wrong please let me know lol:

    <?php
    /*
    * Copyright 2003 Mark O'Sullivan
    * This file is part of Vanilla.
    * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    * The latest source code for Vanilla is available at www.lussumo.com
    * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
    *
    * Description: Display and manipulate discussions
    */

    include("appg/settings.php");
    $Configuration['SELF_URL'] = 'Anime_Junction.php';
    include("appg/init_vanilla.php");

    // 1. DEFINE VARIABLES AND PROPERTIES SPECIFIC TO THIS PAGE

    // Ensure the user is allowed to view this page
    $Context->Session->Check($Context);
    if (!$Configuration["USE_CATEGORIES"]) header("location:".GetUrl($Configuration, "index.php"));

    // Define properties of the page controls that are specific to this page
    $Head->BodyId = 'CategoryPage';
    $Menu->CurrentTab = "anime_junction";
    $Panel->CssClass = "CategoryPanel";
    $Panel->BodyCssClass = "Categories";
    $Context->PageTitle = $Context->GetDefinition("Categories");

    // 2. BUILD PAGE CONTROLS

    // Add the category list to the body
    $CategoryList = $Context->ObjectFactory->CreateControl($Context, "CategoryList");

    // 3. ADD CONTROLS TO THE PAGE

    $Page->AddRenderControl($Head, $Configuration["CONTROL_POSITION_HEAD"]);
    $Page->AddRenderControl($Menu, $Configuration["CONTROL_POSITION_MENU"]);
    $Page->AddRenderControl($Panel, $Configuration["CONTROL_POSITION_PANEL"]);
    $Page->AddRenderControl($NoticeCollector, $Configuration['CONTROL_POSITION_NOTICES']);
    $Page->AddRenderControl($CategoryList, $Configuration["CONTROL_POSITION_BODY_ITEM"]);
    $Page->AddRenderControl($Foot, $Configuration["CONTROL_POSITION_FOOT"]);
    $Page->AddRenderControl($PageEnd, $Configuration["CONTROL_POSITION_PAGE_END"]);

    // 4. FIRE PAGE EVENTS

    $Page->FireEvents();

    ?>

    and this is the type of html I'd like to have in it:

    <tr>
    <td class=\'maintitle\' colspan="2"><center>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/1/1.html">#</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/A/A.html">A</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/B/B.html">B</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/C/C.html">C</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/D/D.html">D</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/E/E.html">E</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/F/F.html">F</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/G/G.html">G</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/H/H.html">H</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/I/I.html">I</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/J/J.html">J</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/K/K.html">K</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/L/L.html">L</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/M/M.html">M</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/N/N.html">N</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/O/O.html">O</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/P/P.html">P</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/Q/Q.html">Q</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/R/R.html">R</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/S/S.html">S</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/T/T.html">T</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/U/U.html">U</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/V/V.html">V</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/W/W.html">W</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/X/X.html">X</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/Y/Y.html">Y</a>
     <a href="http://oga.mmorpgnut.com/Anime_Junction/Anime_Reviews/Z/Z.html">Z</a>
    </center>

    </td>
    </tr>

    <tr>
    <td class="post1" width="5%" valign="top" style="padding:5px">Anime Reviews from A-Z. If you would like to submit your own review for an anime that currently isn\'t on this list, please email it to Crazyotaku@mchsi.com. Below are what you need for the review:
    <p />·Picture from the anime (preferribly not too big, but not too small, if you need a reference just check a current review pic on this site.)
    <br />·Summary of anime
    <br />·Year it was released in japan or the US
    <br />·Number of episodes
    <br />·Type: Movie, OVA, TV.
    <br />·Company that released it
    <br />·Any other information you feel is neccessary
    </td>

    </tr>
    </table>
    • CommentAuthorithcy
    • CommentTimeAug 30th 2006 edited
     # 2
    (fixed)

    // 2. BUILD PAGE CONTROLS

    // Add the custom HTML to the body
    class BodyContent
    {
    function BodyContent(&$Context)
    {
    $this->Context = &$Context;
    }

    function Render()
    {
    $html = "<table>etc</table>";
    echo($html);
    }
    }

    $BodyContent = $Context->ObjectFactory->NewContextObject($Context, 'BodyContent');

    // 3. ADD CONTROLS TO THE PAGE

    $Page->AddRenderControl($Head, $Configuration["CONTROL_POSITION_HEAD"]);
    $Page->AddRenderControl($Menu, $Configuration["CONTROL_POSITION_MENU"]);
    $Page->AddRenderControl($Panel, $Configuration["CONTROL_POSITION_PANEL"]);
    $Page->AddRenderControl($NoticeCollector, $Configuration['CONTROL_POSITION_NOTICES']);
    $Page->AddRenderControl($BodyContent, $Configuration["CONTROL_POSITION_BODY_ITEM"]);
    $Page->AddRenderControl($Foot, $Configuration["CONTROL_POSITION_FOOT"]);
    $Page->AddRenderControl($PageEnd, $Configuration["CONTROL_POSITION_PAGE_END"]);
    • CommentAuthorCrazyotaku
    • CommentTimeAug 30th 2006 edited
     # 3
    ah thank you very much, as you can see i am a php newbie lol.

    EDIT: hmm i tried your exact code there and I got this error in the body of the page:

    Fatal error: Call to a member function on a non-object in /mounted-storage/home4/sub002/sc11923-BRUP/oga/Vanilla.1.0.1/library/Framework/Framework.Class.Page.php on line 71

    So I went to check out line 71 on the Framework.Class.Page.php file and it has this in it:

    function WriteControls($Controls) {
    // Loop through the controls and write them
    if (is_array($Controls)) {
    ksort($Controls);
    while (list($key, $Control) = each($Controls)) {
    $Control->Render();
    }
    }
    }

    $Control->Render(); is line 71 do I need to add $BodyContent in here somewhere?
    • CommentAuthorithcy
    • CommentTimeAug 30th 2006 edited
     # 4
    i just came back to this thread because i realized i told you the wrong way to do it :)

    $BodyContent needs to be an object, not a string. (It's been a while since i've done this)
    try this:class BodyContent
    {
    function BodyContent(&$Context)
    {
    $this->Context = &$Context;
    }

    function Render()
    {
    $html = "<table>etc</table>";
    echo($html);
    }
    }

    $BodyContent = $Context->ObjectFactory->NewContextObject($Context, 'BodyContent');

    • CommentAuthorCrazyotaku
    • CommentTimeAug 30th 2006
     # 5
    Thank you thank you, now I can start making this into a website. :D
    • CommentAuthorithcy
    • CommentTimeAug 30th 2006
     # 6
    don't thank me until you're sure it works this time :)
    • CommentAuthorCrazyotaku
    • CommentTimeAug 30th 2006
     # 7
    I did test it when i replied.. lol. I should be able to pound out some templates so I can mass produce the custom pages. ^.^
    • CommentAuthorithcy
    • CommentTimeAug 30th 2006
     # 8
    you might also take a look at the Page Manager extension...
  1.  # 9
    I think that's what he's using mate.
    • CommentAuthorithcy
    • CommentTimeAug 30th 2006
     # 10
    not according to the code at the top of the page...
    • CommentAuthorCrazyotaku
    • CommentTimeAug 30th 2006
     # 11
    I am using the page manager extension, but it creates new tabs and keeps each page in one php file, i need them to be totally seperate when I create custom pages, so I am just using that to make new tabs which will be used as the website "sections" and then my own custom pages to be applied to each tabbed section. So it will be like this:

    you click on a tab called Anime Junction and see a page displaying links to anime reviews, then you click on one and bring up a new page still under the anime junction tab. Get the picture now? ^.^
    • CommentAuthorithcy
    • CommentTimeAug 30th 2006
     # 12
    yep
    • CommentAuthorCrazyotaku
    • CommentTimeAug 31st 2006
     # 13
    And now I have another problem.. lol. Ok I got the adding custom pages with html thing working just fine, but now I can't get my custom tabs from the PageMng extension to show up on my custom pages. >< They show up fine on the forum, but whenever I go to a custom page that isn't in the PageMng, the custom tabs go away. Anyone know if there's a way to fix this? Here is my custom page code if that helps:

    <?php
    /*
    * Copyright 2003 Mark O'Sullivan
    * This file is part of Vanilla.
    * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    * The latest source code for Vanilla is available at www.lussumo.com
    * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
    *
    * Description: Display and manipulate discussions
    */

    include("../../../appg/settings.php");
    $Configuration['SELF_URL'] = '1.php';
    include("../../../appg/init_vanilla.php");

    // 1. DEFINE VARIABLES AND PROPERTIES SPECIFIC TO THIS PAGE

    // Ensure the user is allowed to view this page
    $Context->Session->Check($Context);
    if (!$Configuration["USE_CATEGORIES"]) header("location:".GetUrl($Configuration, "index.php"));

    // Define properties of the page controls that are specific to this page
    $Head->BodyId = 'CategoryPage';
    $Menu->CurrentTab = "anime_junction";
    $Panel->CssClass = "CategoryPanel";
    $Panel->BodyCssClass = "Categories";
    $Context->PageTitle = $Context->GetDefinition("1");

    // 2. BUILD PAGE CONTROLS

    // Add the custom HTML to the body
    class BodyContent
    {
    function BodyContent(&$Context)
    {
    $this->Context = &$Context;
    }

    function Render()
    {
    $html = '<table><center>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/1/1.php">#</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/A/A.php">A</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/B/B.php">B</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/C/C.php">C</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/D/D.php">D</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/E/E.php">E</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/F/F.php">F</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/G/G.php">G</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/H/H.php">H</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/I/I.php">I</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/J/J.php">J</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/K/K.php">K</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/L/L.php">L</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/M/M.php">M</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/N/N.php">N</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/O/O.php">O</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/P/P.php">P</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/Q/Q.php">Q</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/R/R.php">R</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/S/S.php">S</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/T/T.php">T</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/U/U.php">U</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/V/V.php">V</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/W/W.php">W</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/X/X.php">X</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/Y/Y.php">Y</a>
     <a href="http://oga.mmorpgnut.com/Vanilla.1.0.1/Anime_Junction/Anime_Reviews/Z/Z.php">Z</a>
    </center>

    <p><center># Reviews
    <p>.hack//sign
    <br>.hack//Legend of The Twilight</center></table>';
    echo($html);
    }
    }

    $BodyContent = $Context->ObjectFactory->NewContextObject($Context, 'BodyContent');


    // 3. ADD CONTROLS TO THE PAGE

    $Page->AddRenderControl($Head, $Configuration["CONTROL_POSITION_HEAD"]);
    $Page->AddRenderControl($Menu, $Configuration["CONTROL_POSITION_MENU"]);
    $Page->AddRenderControl($Panel, $Configuration["CONTROL_POSITION_PANEL"]);
    $Page->AddRenderControl($NoticeCollector, $Configuration['CONTROL_POSITION_NOTICES']);
    $Page->AddRenderControl($BodyContent, $Configuration["CONTROL_POSITION_BODY_ITEM"]);
    $Page->AddRenderControl($Foot, $Configuration["CONTROL_POSITION_FOOT"]);
    $Page->AddRenderControl($PageEnd, $Configuration["CONTROL_POSITION_PAGE_END"]);

    // 4. FIRE PAGE EVENTS

    $Page->FireEvents();

    ?>
    •  
      CommentAuthorercatli
    • CommentTimeSep 4th 2006
     # 14
    I can't add anything to this discussion, but I do have another question please .....

    I have a HTML website with a Vanilla forum attached. I use Google Analytics (which requires insertion of some HTML code) to count visitors to the website, but haven't been able to count how many visit the forum (not many so far!). Does this thread provide a way of doing that, by adding HTML to the Vanilla index page? If so, can someone just explain a little more what I need to do please, or refer me to a website that outlines the code needed? Sorry, but I know nothing about coding except what I pick up on forums like this.
    •  
      CommentAuthorDinoboff
    • CommentTimeSep 5th 2006 edited
     # 15
    Is it not a script to add in the header?
    If so, you just need to make an extension:
    $Head->AddString("<script>...</script>");
    or $Head->AddScript("http://url/to/the/script");
    •  
      CommentAuthorercatli
    • CommentTimeSep 6th 2006
     # 16
    Sorry Dinoboff, but which file(s) should I add that to? Can the HTML between the script tags be anything?
    •  
      CommentAuthorDinoboff
    • CommentTimeSep 6th 2006
     # 17
    It was just a guess I don't know how Google Analytics work.
    What do you need to add in your pages and where in the pages?
    •  
      CommentAuthorDinoboff
    • CommentTimeSep 6th 2006 edited
     # 18
    I check on google:
    ...
    $Configuration['GoogleAnalyticsAccountNumber'] = 'xxxx-x';
    //add an array of pages to not analyse
    if ( !in_array($Context->SelfUrl, array('settings.php')) ) {
    $Head->AddScript("http://www.google-analytics.com/urchin.js");
    $Head->AddString("
    _uacct=\"UA-".$Configuration['GoogleAnalyticsAccountNumber']."\";
    urchinTracker();
    ");
    }
    •  
      CommentAuthorercatli
    • CommentTimeSep 7th 2006
     # 19
    I'm sorry, Dinoboff, I'm not just not sure what I should try.

    To answer your earlier question, the Google Analytics code is a simple few lines of HTML, inserted just above the tag in any HTML page:


    _uacct = "xxxxxxxxx"; urchinTracker();

    This slightly different to your listing, though seems to contain the same elements. But I guess that is just detail.

    So my real problems are:

    (1) Which file(s) should I insert this code into? There is the same header on most (all?) pages, so I guess the file which controls the header - is that Common.Controls.php? Any others?

    (2) What identification or tags or whatever do I need to include (I am OK on HTML & CSS but know no PHP)? ithcy had "function ...." and you suggested "Addstring".

    Of course I could try, but I thought it best to try to clarify a little first. (I've had too many disasters in the past by experimenting!) :)
    • CommentAuthorithcy
    • CommentTimeSep 7th 2006 edited
     # 20
    just make yourself an add-on with dinoboff's code. it's simple to do.
    1. make a new folder inside the extensions folder.
    2. create a blank textfile and save it as "default.php" inside that folder.
    3. paste the following into it:
    <?php
    /*
    Extension Name: Google Analytics
    Extension Url: http://lussumo.com/community/discussion/3507/
    Description: Adds google analytics code to your vanilla forum pages.
    Version: 1.0
    Author: ercatli
    Author Url: http://lussumo.com/community/account/1973/
    */
    //replace this with your google analytics account number, of course
    $Configuration['GoogleAnalyticsAccountNumber'] = 'xxxx-x';

    //add an array of pages to not analyse
    if ( !in_array($Context->SelfUrl, array('settings.php')) )
    {
    $Head->AddScript("http://www.google-analytics.com/urchin.js");
    $Head->AddString("<script type=\"text/javascript\">;
    _uacct=\"UA-".$Configuration['GoogleAnalyticsAccountNumber']."\";
    urchinTracker();
    </script>");
    }
    ?>


    save it, upload it, enable it. that should be all.
    •  
      CommentAuthorDinoboff
    • CommentTimeSep 7th 2006 edited
     # 21
    like ithcy said
    •  
      CommentAuthorercatli
    • CommentTimeSep 7th 2006
     # 22
    Thanks heaps both of you! Amazingly prompt! This forum continue to surprise & please that members are so willing to help and you can get so much info.

    I had expected to physically add code to pages, and had no idea an extension/add-on was so easy (if you know how). I'll give it a try, and try to understand fully later.
    • CommentAuthorithcy
    • CommentTimeSep 7th 2006 edited
     # 23
    glad to help :)
    just checked out the above add-on at my own forum and it works OK for me.
    • CommentAuthorithcy
    • CommentTimeSep 7th 2006
     # 24
    one caveat: (this is a personal preference of course)

    you might want to go into your analytics settings (on google.com, not in that extension) and change it a little:
    under Profile Settings->Main Website Profile Information, edit the Exclude URL Query Parameters field so that it says "page, PostBackAction" - just so you don't get a lot of different kinds of hits for what is really a request for the same page.

    for example a request for this:
    http://lussumo.com/community/comments.php?DiscussionID=3507&page=1

    is really the same as a request for this:
    http://lussumo.com/community/comments.php?DiscussionID=3507

    and this:
    http://lussumo.com/community/comments.php?DiscussionID=3507&PostBackAction=whatever

    but you really only care about hits on that thread, not on each of the individual pages or when people save settings. so all you want is the "DiscussionID" part of the url - you want google analytics to ignore the "page" and "postbackaction" parts.

    sorry if this is not clear, i didn't explain very well.
    • CommentAuthorithcy
    • CommentTimeSep 7th 2006
     # 25
    i uploaded it to add-ons - here.

    dinoboff, i credited you as the author in the source. i know you're thrilled.
    •  
      CommentAuthorDinoboff
    • CommentTimeSep 8th 2006
     # 26
    of course i am :-P
    •  
      CommentAuthorercatli
    • CommentTimeSep 8th 2006
     # 27
    Hey guys, I just need a little more help please.

    I have just (finally) upgraded to 1.01 (from 0.9.2.6) tonight. I chose the add-ons I wanted, including Google Analytics and uploaded about a dozen to my site. But I had 2 problems .....

    (1) Vanilla didn't list Google Analytics in the Extensions list under settings. I'm assuming this was because it wasn't in the form of /Extension name/default.php. I put it in a folder as required - should I just change the name of the file to default.php?

    (2) There didn't seem to be a save button on the Extensions page in Settings, but that is a separate problem.
    • CommentAuthorithcy
    • CommentTimeSep 8th 2006 edited
     # 28
    just download the one from the addons site. yes, it does have to be named default.php inside a folder.

    there is no save button because it's all done through ajax. the save happens invisibly when you click a checkbox.
    • CommentAuthortthmaz
    • CommentTimeSep 8th 2006
     # 29
    I get this error when trying to preview my message:

    Fatal error: Call to a member function on a non-object in /home/console/public_html/engineersvoice/extensions/GoogleAnalytics/default.php on line 17

    Line 17 looks like pointing to this line in the default.php
    $Head->AddScript("http://www.google-analytics.com/urchin.js");

    Any solutions to this problem?
    •  
      CommentAuthorercatli
    • CommentTimeSep 9th 2006
     # 30
    ithcy,

    thanks for your patience, can i bother you one more time please?

    i have succesfully downloaded and installed now thanks - it was just stupidity on my part that prevented your extension appearing in the list of extensions the first time. and the failure to save was a permissions problem - the documentations says they are the biggest source of problems, and I had missed one - so that is also now cool.

    i just wanted to check about your advice about "page, PostBackAction". i understand what you are getting at, and I agree that i don't want all these extra "hits" recorded. but i am unclear about how i do that.

    at present i do not record my own hits - i exclude these by using a filter. i presume you are suggesting another filter? from the choices open to me, it must be a custom filter, and the two main options i need to choose are:

    filter field - chosen from a list of a whole range of fields (e.g. page title, visitor country, etc)
    filter pattern - this is blank and i have to fill in

    so, can you expand your advice any further please to what i should enter to exclude the things you have suggested? or am i in the wrong section of google analytics??

    thanks again
    • CommentAuthorithcy
    • CommentTimeSep 9th 2006
     # 31
    tthmaz: check out this thread or just download the updated google analytics add-on.

    ercatli: glad you got it sorted out. you are in the wrong section of google analytics. make sure you're in Profile Settings->[Main] Website Profile Information, and you're looking for the field called "Exclude URL Query Parameters" exactly.
    • CommentAuthorithcy
    • CommentTimeSep 9th 2006
     # 32
    easier to show than tell:





    •  
      CommentAuthorercatli
    • CommentTimeSep 10th 2006
     # 33
    ithcy, you're a legend! thanks heaps!

    they say a little knowledge is dangerous, and that's my problem. i'm just learning all this stuff as i go along, so i know enough to attempt some of these things, but not enough to complete them successfully. but i can see i'm going to have to read a bit more about php.

    i'm also amazed at how much there is to google analytics, although a little disturbed to find what appear to me to be certain erros in the stats they provide. i just hope the stuff i'm mainly using is ok.

    thanks again.
    • CommentAuthortthmaz
    • CommentTimeSep 10th 2006
     # 34
    I have a suggestion. Wouldn't it be better to place the analytics code at the bottom of the HTML codes? From what I can see, this addon adds it at the top, while another addon (sidepanel)add it at the panel, where both can be an disadvantage since google analytic can be slow in collecting data from a visitor and the page won't continue loading b4 it finishes collecting data, which can be a bad thing for visitors.

    Any comments?
    • CommentAuthorithcy
    • CommentTimeSep 10th 2006
     # 35
    the page won't continue loading b4 it finishes collecting data

    are you sure about this? how do you know? if it's true, i'll move it to the end of the page.
    • CommentAuthortthmaz
    • CommentTimeSep 10th 2006
     # 36
    Hi itchy,

    Had the same experience with 2 of my sites.

    For example, if i use this addon, sometimes only the header will be loaded while analytics is still collecting visitor's data. As for sidepanel addon, you may only see the header and the panel. Placing the code at the end (footer) at least loads up the full page b4 analytics collects data.

    Yeah,I'm sure of this :) Cheers!
    • CommentAuthorithcy
    • CommentTimeSep 10th 2006 edited
     # 37
    ah, you're absolutely right. i missed this part on the google analytics page:
    "It [the urchin script] should be immediately before the </body> tag of your page"

    i'll change the addon.
    • CommentAuthorithcy
    • CommentTimeSep 11th 2006
     # 38
    ok, the extension is updated. thanks for the alert, tthmaz.
    • CommentAuthortthmaz
    • CommentTimeSep 12th 2006
     # 39
    Nicely done, Itchy!
    •  
      CommentAuthorercatli
    • CommentTimeSep 20th 2006
     # 40
    ithcy

    I'm afraid I'm still having a bunch of problems with Google Analytics. I am getting inconsistent recording of visits when I test, and it is difficult to isolate whether it is because of a fault in GA or at my end. Could you help me please by explaining a little more what the "page" and "PostBackAction" achieve? My understanding is that:

    (1) If a thread goes over onto a second page, the two pages have the same ID number, but a page number is added to the title, so we exclude the "page" from what is recorded, so GA sees them both as the same - is that right? But won't it still record it as two hits, just the same page visited twice??

    (2) I don't understand "PostBackAction" at all, but I think it has something to do with Vanilla responding to some input, and I guess you're wanting to lump the input and the resonse together. But again, won't that still give 2 "hits", just on the same page?

    I'll do some more testing today, and get back to you again if I may if I have any more questions (hope that's OK?). I originally only wanted simple statistics, and thought GA would be easier than Slimstat or Shortstat or Statcounter or whatever, but now I'm enmeshed in it, I want to try to get it right before I give up. Thanks.
    • CommentAuthorithcy
    • CommentTimeSep 21st 2006 edited
     # 41
    you're absolutely right. it will count as multiple hits on the same discussion.
    i just don't like having a really long list of page hits like this in my stats:
    http://myforum.com/discussions.php?DiscussionID=4
    http://myforum.com/discussions.php?DiscussionID=4&Page=2
    http://myforum.com/discussions.php?DiscussionID=4&Page=3&PostBackAction=Save
    http://myforum.com/discussions.php?DiscussionID=4&Page=4
    http://myforum.com/discussions.php?DiscussionID=4&Page=5&PostBackAction=Save
    etc...
    and repeat for each discussion, when they're all really just hits to the same thread. i only care about the hits per discussion, not per discussion and also per page and also per PostBackAction. you might need more granularity than i do.
  2.  # 42
    I think his issue, ithcy, is that it means each time a user does something it will think they visited the thread twice, and he'd rather it just *completely* ignored it?
    •  
      CommentAuthorercatli
    • CommentTimeSep 22nd 2006
     # 43
    Yes it would be nice if there was a way to make GA could ignore the extra apparent hits. but at least now I understand and can interpret. Stats can tell you some useful things, but you can take the actual figures too seriously.
    • CommentAuthorSasquatch
    • CommentTimeJul 20th 2007
     # 44
    I have added some extra pages using this technique.
    But now I can't get anything in the sidebar to show up except the "Start new discussion" button. I'd like to have the Nugget menu I created with the Nuggets Add-On to appear on these pages, so I guess I don't have a firm understanding of how the sidepanel works, if anyone can help me that'd be great.
    • CommentAuthorbashobuddha
    • CommentTimeAug 18th 2007 edited
     # 45
    del.
Add your comments
    Username Password
  • Format comments as