Announcement

Collapse
No announcement yet.

Need a little help.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a little help.

    Hey guys i wanted to ask is something reguarding plugins.Ok first thing is first.With the help of some guys at vB.com Forums i made two plugins.These plugins are used to call custom tamplates i created into certain current templates.I used the Hook "parse_templates" and the code
    PHP Code:
    eval('$mainbody_begin = "' fetch_template('mainbody_begin') . '";'); 
    This works perfectly fine except it only seems to work if you are logged in at the forum.If you are viewing it as a guest it doesnt work.So my question is is there a setting i'm missing to make it work for guests as well as members?
    The main reason i did it this way was to solve the issue of me having to hard code my stuff into many of the vb templates using the plugin system makes it a snap.Any help would be appreciated

    Also reason i posted this here is because here is where i was told how to make this plugin.

  • #2
    Are guests allowed to view your forums?

    Maybe the variable is being referenced within a template conditional that is false for guests.

    Maybe guests are viewing a different style (the default style).

    Comment


    • #3
      Thanks for the reply,
      I was testing the forums myself.I loggeed out and tried to view it as a guest which was when i noticed that the plugins were not showing up,yet i have it set to allow guest to view.I was just doing random tests to make sure all templates were wroking correctly which was when i first noticed the issue in the template "STANDARD_ERROR" which showed up because i was testing the board permissions when i had it set to offline.I later noticed the same thing happens for all guest in all templates.

      as for the style nope no issues there becuase we only have a single style which is set to default.

      Comment


      • #4
        Can you post details? Plugin code, hook location, template code that is using the plugin...

        Comment


        • #5
          Sure here is the info you requester.
          #1
          Hook Location : parse_templates
          Name-mainbody_begin
          Code-eval('$mainbody_begin = "' . fetch_template('mainbody_begin') . '";');

          #2
          Hook Location : parse_templates
          Name-mainbody_end
          Code-eval('$mainbody_end = "' . fetch_template('mainbody_end') . '";');

          mainbody_begin template-
          PHP Code:
          <!-- begin mainbody custom begin -->
          <
          div align="center">
          <
          table width="984" border="0" cellpadding="0" cellspacing="0">
          <
          tr
          <
          td width="5" height="428" background="$vboptions[bburl]/images/neo-wu/mainfiles/lborder.jpg">&nbsp;</td>
          <
          td align="center" valign="top" background="$vboptions[bburl]/images/neo-wu/mainfiles/backround.jpg"style="background-repeat:repeat-y;"><div align="center">
          <
          table width="800" border="0" cellspacing="0" cellpadding="0">
          <
          tr
          <
          td align="left">
          <!-- 
          end mainbody custom begin --> 
          mainbody_end template-
          PHP Code:
          <!-- begin mainbody custom end -->
          <
          br />
          </
          td>
          </
          tr>
          </
          table>
          </
          div>
          </
          td>
          <
          td width="9" colspan="2" align="right" valign="top" background="$vboptions[bburl]/images/neo-wu/mainfiles/rborder.jpg"style="background-repeat:repeat-y;background-position: top right;"><table width="161" height="361" border="0" align="right" cellpadding="0" cellspacing="0">
          <
          tr
          <
          td width="26" height="348"><img src="$vboptions[bburl]/images/neo-wu/mainfiles/rb1.gif" alt="" width="26" height="348"></td>
          <
          td width="114"><img src="$vboptions[bburl]/images/neo-wu/mainfiles/rb2.jpg" alt="" width="114" height="348"></td>
          <
          td width="21"><img src="$vboptions[bburl]/images/neo-wu/mainfiles/rb3.jpg" alt="" width="21" height="348"></td>
          </
          tr>
          <
          tr
          <
          td height="12" background="$vboptions[bburl]/images/neo-wu/mainfiles/rb4.gif">&nbsp;</td>
          <
          td height="20" background="$vboptions[bburl]/images/neo-wu/mainfiles/rb5.jpg">&nbsp;</td>
          <
          td height="12" background="$vboptions[bburl]/images/neo-wu/mainfiles/rb6.jpg">&nbsp;</td>
          </
          tr>
          </
          table></td>
          </
          tr>
          </
          table></div>
          <!-- 
          end mainbody custom end --> 
          I place the code $mainbody_begin in between the default code $header and $navbar, and i place the code $mainbody_end above the default code $footer.Thanks for the help.
          Last edited by bhxtyrant; Wed 12th Oct '05, 3:45pm.

          Comment


          • #6
            Hmm, at first glance it looks good. If you send me a PM with a URL and admin login to your forum then I can poke around to see if I can find the problem.

            Comment


            • #7
              Thanks again for the reply Jake,
              unfortunatly i am not the main admin of our forums and our main admin isn't very trusting so will not allow me to give admin access to anyone outside of our staff.I have set up a copy of vB for testing porposes on my home server but i do not think there is a way you can access it.I use apache by the way.If you know of a way i can set it up to let you access it please let me know and thanks once again for your help.

              Comment


              • #8
                I have very little experience setting up web servers.

                Comment


                • #9
                  Damn,Well thanks non the less for the help,If anyone else out there knows what could be causing this issue or happens to know how to set up a home server for outside viewers please post

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X