Έκανα εγγραφή στο google analytics και μου έδωσε έναν κώδικα απο το site.. σε ποιό σημείο το βάζω??
DONE!
Πρωτα πρεπει να εγκαταστησεις το mod http://custom.simplemachines.org/mods/index.php?mod=2210
Χωρις να κανω εγκατασταση το mod δεν γινεται?
Δεν χρειάζεται εγκατάσταση mod
Άνοιξε το template του theme που χρησιμοποιείς και πριν το
</body></html>';
}
Τοποθέτησε το κώδικα του google
παω να βαλω τον κωδικα,
στο index.template.php πριν απο το </body></html>';
και δεν δουλευει καθολου η σελιδα....
κανω κατι λαθος?
Δείξε μας τον κώδικα...
πηγα εδω,
/public_html/forum/Themes/classic
και ανοιγω αυτο,
index.template.php
και παω καπου εδω,
// Show the load time?
if ($context['show_load_time'])
echo '
<div align="center" class="smalltext">
', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '
</div>';
// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>';
// And then we're done!
echo '
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
// Folder style or inline? Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
(δεν ξερω να βαζω κωδικα αλλιως)
προφανως αναφερεις να το βαλω πριν το bold σωστα?
Quote from: visualuser on August 27, 2010, 02:30:01 AM
παω να βαλω τον κωδικα,
Σε αυτον τον κώδικα αναφέρομαι, του google.
Quote from: vkot on August 27, 2010, 06:28:59 AM
Quote from: visualuser on August 27, 2010, 02:30:01 AM
παω να βαλω τον κωδικα,
Σε αυτον τον κώδικα αναφέρομαι, του google.
ααααα σορρυ.....
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-18214904-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Όπως το φαντάστηκα, το πρόβλημα είναι στα εισαγωγικά/quotes. Χρησιμοποίησε τον κώδικα όπως τον τροποποίησα:
<script type=\"text/javascript\">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-18214904-1\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
για δες.....
θα το δοκιμασω το βραδυ και θα σου πω,
γιατι απο την δουλεια με κοβει το firewall και δεν μπαινω στο σερβερ.