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

klra

like I said, the files listed are the ones on the server - (and the forum is functioning fine).

What to do?

klra

in fact, there are 3 themes installed-

default, a default varient and the one I am using ( that isn't showing the ads).

All 3 themes have a index.php file.

Kindred

that is just a placeholder in case someone tries to access the directory directly.

the only index.php that you would need to edit is in the forum root...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

klra

oK, the Ads work on my other themes, so why would I need to edit the main index.php file?

The ads don't appear in the current theme only.

maihannijat

Where I have done wrong adding this code to my custom theme and getting following error

Template Parse Error!
There was a problem loading the /Themes/orange-lt119v2/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.



Attached is index.template.php if anyone could look into it.

smf 1.1.12
www.chaptersworld.com/forum/

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

maihannijat

Thank you.

It works fine now.

Above index.template.php is clean version of orange-lt119v2 theme If anyone need it.

akashbc

I am finding some problems while installing.
The following were the errors.. :



Execute Modification   ./Themes/Sunshine/index.template.php   Test failed
      1.   Replace   ./Themes/Sunshine/index.template.php   Test successful
      2.   Replace   ./Themes/Sunshine/index.template.php   Test failed
      3.   Replace   ./Themes/Sunshine/index.template.php   Test failed
      4.   Replace   ./Themes/Sunshine/index.template.php   Test failed
      5.   Replace   ./Themes/Sunshine/index.template.php   Test failed

Execute Modification   ./Themes/Sunshine/BoardIndex.template.php   Test failed

2.   Replace   ./Themes/Sunshine/BoardIndex.template.php   Test failed




What do i do??

Kindred

sounds like your sushine theme is different enough from the curve/default that the auto installed can't find the code to modify.  You'll have to go in and manually edit the files, with some human assumption on where the correct location is.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akashbc

Quote from: Kindred on November 18, 2010, 10:25:23 AM
sounds like your sushine theme is different enough from the curve/default that the auto installed can't find the code to modify.  You'll have to go in and manually edit the files, with some human assumption on where the correct location is.

Nope ,,there is no code to find manually ,they are not their in the files,
Also when i tried to install it in core theme also ,it shows same errors,
Exactly i am using rc 3 theme "sunshine" in rc4 smf software..

What do i do?

Kindred

what do you mean "there is no code to find manually"?

If those files exist, then there is code in those files...    if it is too different from the curve/default theme, then you may have to use some human assumption on where to place the added code for this mod
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akashbc

Quote from: Kindred on November 18, 2010, 10:47:11 AM
what do you mean "there is no code to find manually"?

If those files exist, then there is code in those files...    if it is too different from the curve/default theme, then you may have to use some human assumption on where to place the added code for this mod

Can you please be friend?
I am not  well at that..so ,errors will occur if i place it in wrong areas...  :(

Kindred

I am not being unfriendly.

maybe, if you attach your index.template.php, someone can edit it for you...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

akashbc

Here are my attachments,please edit these files in it:


Execute Modification   ./Themes/Sunshine/index.template.php   Test failed
      1.   Replace   ./Themes/Sunshine/index.template.php   Test successful
      2.   Replace   ./Themes/Sunshine/index.template.php   Test failed
      3.   Replace   ./Themes/Sunshine/index.template.php   Test failed
      4.   Replace   ./Themes/Sunshine/index.template.php   Test failed
      5.   Replace   ./Themes/Sunshine/index.template.php   Test failed

Execute Modification   ./Themes/Sunshine/BoardIndex.template.php   Test failed

2.   Replace   ./Themes/Sunshine/BoardIndex.template.php   Test failed



Thank you so much :)

PLAYBOY

I have a custom theme and ads didint appear after installation so i spent the last 2 hours looking for an answer everywhere. I tried to manually edit the custom theme index.template.php but thas not possible because the codes are different and everytime i try it gives me parse error. For example it says FIND

<body>';


But there none. There is < body > but when i add the code after, it gives me parse error.
Same with the other codes. How can i make this mod work in my theme?

1.1.12

PLAYBOY

Quote from: maihannijat on September 04, 2010, 12:15:19 AM
Hi

I tried alot to manually install this in my custom theme but not able to add code in index.template.php

I have attached my index.template.php


How to Add This code After <body> Tag
//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);
}


Here is my Body Tag code:
<body>

   <div id="wrapper">
  <div id="header">
<div id="head-l">
<div id="head-r">
  <div id="userarea">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';



I am facing the same problem except mine is 1.1.12
How can i edit this one?

It gives parse error.

MattH41

#5776
I'm having a major problem on my site http://altmarket.net [nofollow]

The Ad Management Mod is not respecting the enable ad permission.

Instead it is just showing the ad to everyone. How can I fix this?

kartheekb

#5777
When i am trying to install getting some errors...

I am using SMF 2.0 rc4, soft cartoon theme.

When i am trying to upload showing errors on broard.index.template & index.template.php

here are the screen shots....

Test fail error image
http://img193.imageshack.us/img193/269/capturedlp.jpg

Showing Code To Modify.
http://img197.imageshack.us/img197/1017/capture2ui.jpg

and

http://img508.imageshack.us/img508/8316/capture3s.jpg

Hope i will get a solution. Thanks in Advance.

Files attached;
www.jntuhub.com/forum (check out my forums)

MattH41

Quote from: kartheekb on November 21, 2010, 12:05:08 AM
When i am trying to install getting some errors...

I am using SMF 2.0 rc4, soft cartoon theme.

When i am trying to upload showing errors on broard.index.template & index.template.php

here are the screen shots....

Test fail error image
http://img193.imageshack.us/img193/269/capturedlp.jpg [nofollow]

Showing Code To Modify.
http://img197.imageshack.us/img197/1017/capture2ui.jpg [nofollow]

and

http://img508.imageshack.us/img508/8316/capture3s.jpg [nofollow]

Hope i will get a solution. Thanks in Advance.

The solution is to make the manual edits to your theme that it indicates.

PLAYBOY

I cant make manual edits to my theme. Same here...


Quote from: PLAYBOY on November 18, 2010, 03:46:49 PM
Quote from: maihannijat on September 04, 2010, 12:15:19 AM
Hi

I tried alot to manually install this in my custom theme but not able to add code in index.template.php

I have attached my index.template.php


How to Add This code After <body> Tag
//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);
}


Here is my Body Tag code:
<body>

   <div id="wrapper">
  <div id="header">
<div id="head-l">
<div id="head-r">
  <div id="userarea">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';



I am facing the same problem except mine is 1.1.12
How can i edit this one?

It gives parse error.

Advertisement: