News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ad Management mod

Started by SMFHacks.com Team, January 30, 2006, 08:41:19 PM

Previous topic - Next topic

shadowravenhawk

My index.template.php for my Alien Nation theme is attached.

arsgeek

Quote from: ccbtimewiz on July 24, 2008, 01:55:49 PM
Both of you, ATTACH your index.template.php files. I'll see what I can do.

Here you go. And thanks - it's the default template for SMF 1.1.5

wlchase

I installed this mod on the default theme, as noted, and it's sooo cool! Great work!

BUT, of course, I'd much rather use the Big Blue 11 theme.

I started the manual edit, but BB11 does not have a BoardIndex.template.php,  MessageIndex.template.php, nor Display.template.php. And when I edit the index.template.php, at the part where I find <body>';, I find only <body> and when I add the

    //Display ads on the top of the page
    if (function_exists("show_topofpageAds"))
    {
        $ads = show_topofpageAds();   
        if(!empty($ads))
            if($ads['type']==0)
                echo $ads['content'];
            else
                eval($ads['content']);   
        unset($ads);
    }


I get a syntax error that it's missing a "," or ";".

Thanks for a great mod, and any help you can send my way!
Bill
Bill http://www.czfirearms.us  SysAdmin

ccbtimewiz

Here you are, good sir.

I simply did this:

echo '
</head>
<body>';
  //Display ads on the top of the page
    if (function_exists("show_topofpageAds"))
    {
        $ads = show_topofpageAds();   
        if(!empty($ads))
            if($ads['type']==0)
                echo $ads['content'];
            else
                eval($ads['content']);   
        unset($ads);
    }
    echo '
  <div id="wrapper">
  <div id="header">
<div id="header-l">
<div id="header-r">
  <div id="userarea">';

ccbtimewiz

@arsgeek > Here is your new index.template.php file. I removed the duplicate code and inserted a statement that shows the ads to both logged-in and guest users.

Also please alter your permissions via Admin > Permissions on the guest membergroup.

wlchase

Quote from: ccbtimewiz on July 25, 2008, 01:32:51 PM
Here you are, good sir.

I simply did this:

Wow! Speedy!
The lack of the other files, BoardIndex.template.php, etc., won't mess things up?

Thanks!
Bill

Bill http://www.czfirearms.us  SysAdmin

arsgeek

Quote from: ccbtimewiz on July 25, 2008, 01:36:58 PM
@arsgeek > Here is your new index.template.php file. I removed the duplicate code and inserted a statement that shows the ads to both logged-in and guest users.

Also please alter your permissions via Admin > Permissions on the guest membergroup.

Ahh very nice, thank you!

ccbtimewiz

Quote from: wlchase on July 25, 2008, 01:46:28 PM
Quote from: ccbtimewiz on July 25, 2008, 01:32:51 PM
Here you are, good sir.

I simply did this:

Wow! Speedy!
The lack of the other files, BoardIndex.template.php, etc., won't mess things up?

Thanks!
Bill



That depends. Are those said files in your theme?

wlchase

Quote from: ccbtimewiz on July 25, 2008, 02:20:47 PM
Quote from: wlchase on July 25, 2008, 01:46:28 PM
Wow! Speedy!
The lack of the other files, BoardIndex.template.php, etc., won't mess things up?

Thanks!
Bill



That depends. Are those said files in your theme?

No, Big Blue doesn't have the BoardIndex., MessageIndex. or Display.template.php.

Hmm... I see now it also says it's compatible with 1.1.4..... maybe I'm trying to use something I shouldn't.

Bill
Bill http://www.czfirearms.us  SysAdmin

shadowravenhawk

ccbtimewiz it still isn't working. Your index.template puts the ad at the top of the forum but it cuts the whole top part of the forum off.

Urbanite

Quote from: ccbtimewiz on July 25, 2008, 01:36:58 PM
..... I removed the duplicate code and inserted a statement that shows the ads to both logged-in and guest users.

Also please alter your permissions via Admin > Permissions on the guest membergroup.

Hey ccbtimewiz, what is this statement you are talking about, is it possible to show the "welcome area" ad even if permissions in the membergroup is turned off with a similar "statement"?

Just when you finally get it idiot proof ...along comes a bigger idiot!

ccbtimewiz

Quote from: ImNoDozer on July 25, 2008, 04:23:02 PM
Quote from: ccbtimewiz on July 25, 2008, 01:36:58 PM
..... I removed the duplicate code and inserted a statement that shows the ads to both logged-in and guest users.

Also please alter your permissions via Admin > Permissions on the guest membergroup.

Hey ccbtimewiz, what is this statement you are talking about, is it possible to show the "welcome area" ad even if permissions in the membergroup is turned off with a similar "statement"?


I haven't tested that yet, but I think local permissions override global permissions. So it works if the permissions are set in the SMF console.

@shadowravenhawk > I didn't alter your template? Where is your template?

John Rambo

You put out beautifull work jerm.

Thanks.  :)

shadowravenhawk

Here my index.template.php for my Alien Nation theme. I am also having problems getting two banners to appear that the top of the forum.

xsghost

#2854
How do i get this mod working for the theme kelo-lt?
, here:
http://demo.padexx.de/smf/index.php?theme=28

Thanks

ccbtimewiz

Quote from: xsghost on July 25, 2008, 07:17:39 PM
How do i get this mod working for the theme kelo-lt?
, here:
http://demo.padexx.de/smf/index.php?theme=28

Thanks

You'll be needing to edit the theme you're using by editing the core templates via FTP. How do I use FTP? / What is FTP?

The location of said files would be found in:

The location of the file is %root%/%smf_root%/Themes/*name of theme*/

You can find manual modification instructions on that modification's thread and/or use the parser built in on the mod display.

ccbtimewiz

@shadowravenhawk > I've repaired the URLs of your image links. You need to use absolute links such as "http://" instead of relative links like "www". I also found no problems with your ad-mod.

shadowravenhawk

It didn't work and the ads are only appearing on every page but the home home.

ccbtimewiz

Quote from: shadowravenhawk on July 25, 2008, 09:54:02 PM
It didn't work and the ads are only appearing on every page but the home home.

Strange. Link to site? Also, what is your "home" home? index.php? Or index.php?action=home?

xsghost

ccbtimewiz, would you be able to
Quote from: ccbtimewiz on July 25, 2008, 07:46:15 PM
Quote from: xsghost on July 25, 2008, 07:17:39 PM
How do i get this mod working for the theme kelo-lt?
, here:
http://demo.padexx.de/smf/index.php?theme=28

Thanks

You'll be needing to edit the theme you're using by editing the core templates via FTP. How do I use FTP? / What is FTP?

The location of said files would be found in:

The location of the file is %root%/%smf_root%/Themes/*name of theme*/

You can find manual modification instructions on that modification's thread and/or use the parser built in on the mod display.


ccbtimewiz, would you be able to help me with this mod as well? I am still new to SMF and learning how to mod these files manually. :)

Thanks

Advertisement: