Site Name In Browser

tunescool

BANNED
Joined
Jul 23, 2011
Messages
1,262
Reaction score
3,338
i dont know where to put my site name on this site so it shows up in the browser header, i put it between the apostrophes but no

Code:
$title = (isset($this->title) and !empty($this->title)) ? $this->title : $this->translation['sitename'];

http://nookmoviepreview.com
 
it gets the text Movie Database 2 from somewhere, i need to replace it

Code:
<!DOCTYPE html>
    <html lang="en" class="no-js">
    <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="HandheldFriendly" content="true" />
    <base href="<?php echo \NG\Uri::baseUrl(); ?>" />
    <?php
    $title = (isset($this->title) and !empty($this->title)) ? $this->title : $this->translation['sitename'];
    $description = (isset($this->metaDescription) and !empty($this->metaDescription)) ? $this->metaDescription : $this->translation['defaultMetaDescription'];
    $keywords = (isset($this->metaKeywords) and !empty($this->metaKeywords)) ? $this->metaKeywords : $this->translation['defaultMetaKeywords'];
    ?>
    <title><?php echo $title; ?></title>
    <meta name="description" content="<?php echo $description; ?>">
    <meta name="keywords" content="<?php echo $keywords; ?>">
    <?php
    if (isset($this->og) and is_array($this->og)):
        foreach ($this->og as $type => $og):
            echo '<meta property="og:' . $type . '" content="' . $og . '"/>';
        endforeach;
    endif;
    if (isset($this->canonical) and !empty($this->canonical)):
        echo '<link rel="canonical" href="'.$this->canonical.'" />';
        echo '<link rel="alternate" hreflang="'.\NG\Registry::get("requestedLanuage").'" href="'.$this->canonical.'" />';
    endif;
    ?>
    <link rel="shortcut icon" href="favicon.ico">
    <?php 
    // DEVELOPMENT VERSION //
    /*
    <link rel="stylesheet" href="Assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="Assets/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="Assets/css/zoombox.css">
    <link rel="stylesheet" href="Assets/css/style.css">
    */
    ?>
    <link rel="stylesheet" href="Assets/css/app.min.css">
    <script>var baseURL = "<?php echo \NG\Uri::baseUrl(); ?>"; var requestedLanguage = "<?php echo \NG\Registry::get("requestedLanguage");?>"; 
    <?php if(isset($this->objects["settings"]["fb:app_id"]) and is_numeric($this->objects["settings"]["fb:app_id"])): ?>
    var FB_APP_ID = '<?php echo $this->objects["settings"]["fb:app_id"];?>';
    <?php endif; ?>
    var Number_Of_Profile_Movies = <?php echo $this->objects["settings"]["Number_Of_Profile_Movies"]; ?>;
    var channelUrl ='<?php echo \NG\Uri::baseUrl(); ?>channel.php';
    var loadmoretext = "<?php echo $this->translation['load_more']; ?>";
    var noResults = "<?php echo $this->translation['noResults']; ?>";
    <?php if(isset($this->movie['id']) and is_numeric($this->movie['id'])):?>
    var mid = '<?php echo $this->movie['id'];?>';
    <?php endif; ?>
    </script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
    <!--[if lte IE 7]>
    <script src="Assets/js/lte-ie7.js">
    </script><![endif]-->
    <meta name="msvalidate.01" content="D401D44E834189A55DF47F3CEA5557D8" />
    </head>
 
Like i said, just remove or modify

Code:
    <title><?php echo $title; ?></title>
 
Did you manage to sort this in the end? I guess not from the link you posted?

I have no experience with that script, but from the looks of it there should be localization files somewhere where you can change the title. I'd run a search in files for that string, i.e. "Movies Database 2". Either that or read the documentation and / or search through comments on it's support / comments thread (I can't post links so Google it).

Note - You'll need to make the above change for both English and Russian localization files as you have those on your site. Should be simple enough once you work out where those files are located.

Failing that, a really hacky solution should be to replace:

PHP:
$title = (isset($this->title) and !empty($this->title)) ? $this->title : $this->translation['sitename'];

With:

PHP:
$title = (isset($this->title) and !empty($this->title)) ? $this->title : "Your site name";

I'm not a fan of the above as:

1. It's hacky
2. You have English & Russian on your site. The above would only solve your issue for 1 of the languages, whichever you choose.

But yeah, ideally try to find the localization files.

Good luck!
 
Can you explain a little bit what was the problem?
I see you confused PHP with HTML.

How did that turn out in the end?

It would be really nice if people would post solutions to their problems, so others can benefit from that as well.
 
easiest way of achieving this,rather than reading the file and editing would be putting this at the bottom of the HTML page

<script>
document.title="My Title Here"
</script>
 
Back
Top