vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Editting Template Problem (https://vborg.vbsupport.ru/showthread.php?t=244624)

calumn 06-14-2010 07:22 PM

Editting Template Problem
 
Hello

I am trying to edit the footer template on a forum in order to move the vbulletin copyright (not getting rid of it, just moving it).

However, I do the changes in the footer template and stuff, which is all fine. Then I click save and it says:

Quote:

Unclosed Curly Brace Expression
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
I have checked the template and there is the same number of open brackets and close brackets - so if I ignore this error I would expect it to work.

But, when I click to ignore and it is done it gives an error saying that the template is being editted by someone else so my changes havent been saved. It then shows me the original template again so my changes have been reversed.

There is definitely no one else editting the template.

I was wondering, is this some sort of protection to stop people removing the footer? Or is it a bug? Anyone know what to do?

Calum

Rafa-el 06-14-2010 08:13 PM

No, that's because as the message said you're moving more of the template brackets allowed so double check for the missing tags and you will be ready.

calumn 06-14-2010 09:45 PM

Quote:

Originally Posted by Rafa-el (Post 2053677)
No, that's because as the message said you're moving more of the template brackets allowed so double check for the missing tags and you will be ready.

I am definitely not moving it so that it creates missing tags (at least I think not).

This is the new footer:

Code:

{vb:raw ad_location.ad_footer_start}
{vb:raw ad_location.global_above_footer}

{vb:raw ad_location.ad_footer_end}

<div align="center" style="width: 100%;">
<div id="footer_time" class="shade footer_time" style="width: 250px; color: #000000;">{vb:rawphrase all_times_are_gmt_x_time_now_is_y}<br />
Copyright &copy; 2009-2010 <a
href="http://www.xxxxxxxx.com/">xxxxx</a>.<br />
Powered by vBulletin? Version 4.0.3
Copyright &copy; 2010 vBulletin Solutions, Inc.<br />All rights reserved.</div>

</div>
<div id="footer" class="floatcontainer footer">
        <form action="{vb:raw vboptions.forumhome}.php" method="get" id="footer_select" class="footer_select">

                       
                <vb:if condition="$show['quickchooser']">
                        <select name="styleid" onchange="switch_id(this, 'style')">
                                <optgroup label="{vb:rawphrase quick_style_chooser}">
                                        {vb:raw quickchooserbits}
                                </optgroup>
                        </select>       
                </vb:if>
               
                <vb:if condition="$show['languagechooser']">
                        <select name="langid" onchange="switch_id(this, 'lang')">
                                <optgroup label="{vb:rawphrase quick_language_chooser}">
                                        {vb:raw languagechooserbits}
                                </optgroup>
                        </select>
                </vb:if>
        </form>
        <ul id="footer_links" class="footer_links">
                <vb:if condition="$show['contactus']"><li><a href="{vb:raw vboptions.contactuslink}" rel="nofollow" accesskey="9">{vb:rawphrase contact_us}</a></li></vb:if>
                <vb:if condition="$vboptions['hometitle']"><li><a href="{vb:raw vboptions.homeurl}">{vb:raw vboptions.hometitle}</a></li></vb:if>
                <vb:if condition="$show['admincplink']"><li><a href="{vb:raw admincpdir}/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase admin}</a></li></vb:if>
                <vb:if condition="$show['modcplink']"><li><a href="{vb:raw modcpdir}/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase mod}</a></li></vb:if>
                <vb:if condition="$vboptions['archiveenabled']"><li><a href="archive/index.php">{vb:rawphrase archive}</a></li></vb:if>
                {vb:raw template_hook.footer_links}
                <vb:if condition="$vboptions['privacyurl']"><li><a href="{vb:raw vboptions.privacyurl}">{vb:rawphrase privacy_statement}</a></li></vb:if>
                <vb:if condition="$vboptions['tosurl']"><li><a href="{vb:raw vboptions.tosurl}">{vb:rawphrase terms_of_service}</a></li></vb:if>
                <li><a href="{vb:raw relpath}#top" onclick="document.location.hash='top'; return false;">{vb:rawphrase top}</a></li>
        </ul>
</div>
</td></tr></table> <!-- closing div for body_wrapper -->

<div class="footer_area">
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td valign="top" width="250"></td>
<td bgcolor="#262626" width="1"></td>
<td width="15"></td>
<td width="353" valign="top"><br />
<p>
<b>Want to know about new blog posts?</b>  Enter your
 e-mail address by <a target="new"
href="http://feedburner.google.com/fb/a/mailverify?uri=XXXXX"
rel="nofollow">clicking here</a> to have posts sent to your inbox!
</p>
</td>
<td bgcolor="#262626" width="1"></td>
<td width="15"></td>
<td width="250" valign="top"><br />

{vb:raw cronimage}
</td>
</tr></table>
</div>
</td>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7434387-1");
pageTracker._trackPageview();
} catch(err) {}</script>

</tr></table>

I want to move the copyright so it is under the time, so I changed it to:

Code:

{vb:raw ad_location.ad_footer_start}
{vb:raw ad_location.global_above_footer}

{vb:raw ad_location.ad_footer_end}

<div align="center" style="width: 100%;">
<div id="footer_time" class="shade footer_time" style="width: 250px; color: #000000;">{vb:rawphrase all_times_are_gmt_x_time_now_is_y}</div>
</div>
<div id="footer" class="floatcontainer footer">
        <form action="{vb:raw vboptions.forumhome}.php" method="get" id="footer_select" class="footer_select">

                       
                <vb:if condition="$show['quickchooser']">
                        <select name="styleid" onchange="switch_id(this, 'style')">
                                <optgroup label="{vb:rawphrase quick_style_chooser}">
                                        {vb:raw quickchooserbits}
                                </optgroup>
                        </select>       
                </vb:if>
               
                <vb:if condition="$show['languagechooser']">
                        <select name="langid" onchange="switch_id(this, 'lang')">
                                <optgroup label="{vb:rawphrase quick_language_chooser}">
                                        {vb:raw languagechooserbits}
                                </optgroup>
                        </select>
                </vb:if>
        </form>
        <ul id="footer_links" class="footer_links">
                <vb:if condition="$show['contactus']"><li><a href="{vb:raw vboptions.contactuslink}" rel="nofollow" accesskey="9">{vb:rawphrase contact_us}</a></li></vb:if>
                <vb:if condition="$vboptions['hometitle']"><li><a href="{vb:raw vboptions.homeurl}">{vb:raw vboptions.hometitle}</a></li></vb:if>
                <vb:if condition="$show['admincplink']"><li><a href="{vb:raw admincpdir}/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase admin}</a></li></vb:if>
                <vb:if condition="$show['modcplink']"><li><a href="{vb:raw modcpdir}/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase mod}</a></li></vb:if>
                <vb:if condition="$vboptions['archiveenabled']"><li><a href="archive/index.php">{vb:rawphrase archive}</a></li></vb:if>
                {vb:raw template_hook.footer_links}
                <vb:if condition="$vboptions['privacyurl']"><li><a href="{vb:raw vboptions.privacyurl}">{vb:rawphrase privacy_statement}</a></li></vb:if>
                <vb:if condition="$vboptions['tosurl']"><li><a href="{vb:raw vboptions.tosurl}">{vb:rawphrase terms_of_service}</a></li></vb:if>
                <li><a href="{vb:raw relpath}#top" onclick="document.location.hash='top'; return false;">{vb:rawphrase top}</a></li>
        </ul>
</div>
</td></tr></table> <!-- closing div for body_wrapper -->

<div class="footer_area">
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td valign="top" width="250"></td>
<td bgcolor="#262626" width="1"></td>
<td width="15"></td>
<td width="353" valign="top"><br />
<p>
<b>Want to know about new blog posts?</b>  Enter your
 e-mail address by <a target="new"
href="http://feedburner.google.com/fb/a/mailverify?uri=XXXXX"
rel="nofollow">clicking here</a> to have posts sent to your inbox!
</p>
</td>
<td bgcolor="#262626" width="1"></td>
<td width="15"></td>
<td width="250" valign="top"><br />
<p>
Copyright &copy; 2009-2010 <a
href="http://www.xxxxxxxx.com/">xxxxx</a>.<br />
Powered by vBulletin? Version 4.0.3
Copyright &copy; 2010 vBulletin Solutions, Inc.<br />All rights reserved.<br />
</p>

{vb:raw cronimage}
</td>
</tr></table>
</div>
</td>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7434387-1");
pageTracker._trackPageview();
} catch(err) {}</script>

</tr></table>

Red is the moved code

DragonBlade 06-15-2010 02:16 AM

Here is the offending code that is giving you the error

Code:

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7434387-1");
pageTracker._trackPageview();
} catch(err) {}</script>


calumn 06-15-2010 08:55 AM

Quote:

Originally Posted by DragonBlade (Post 2053814)
Here is the offending code that is giving you the error

Code:

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7434387-1");
pageTracker._trackPageview();
} catch(err) {}</script>


Thanks, but what is wrong with it?

I assume it is part of Google Analytics because I think the rest is, but I can't be certain.

DragonBlade 06-15-2010 10:13 AM

A fix would be to use this instead:
Code:

<vb:literal>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7434387-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</vb:literal>


Lynne 06-15-2010 01:43 PM

Actually, the problem is right here:
HTML Code:

Copyright &copy; 2009-2010 <a
href="http://www.xxxxxxxx.com/">
xxxxx</a>.<br />

You can't put a line break right after you start your <a> tag.

your24hourstore 06-16-2010 12:49 AM

lol now thats funny stuff. lynne is so kool

DragonBlade 06-16-2010 03:13 AM

Quote:

Originally Posted by Lynne (Post 2054019)
Actually, the problem is right here:
HTML Code:

Copyright &copy; 2009-2010 <a
href="http://www.xxxxxxxx.com/">
xxxxx</a>.<br />

You can't put a line break right after you start your <a> tag.

It still functions correctly even if you put a line break right there. (Yes, I already tried it out myself :P)

ChopSuey 06-16-2010 07:28 AM

Revert your template, then try replacing it again.


All times are GMT. The time now is 06:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01086 seconds
  • Memory Usage 1,789KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete