Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2002
Posts: 5
Lurker
Lurker
Joined: Dec 2002
Posts: 5
Hi Guys:

I want to put an island between the first and second post in a PM thread. I get LOTS of PM traffic, and I want to put ssome advertising in there.

I know just enough coding to be dangerous.

Whatcha all think? I get the sense it's either a really simple template mod, or a highly complex re-write job.

Any helpers?

rb


Sponsored Links
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
i'd call it a template + code (small/medium) mod.

doable

Joined: Dec 2002
Posts: 5
Lurker
Lurker
Joined: Dec 2002
Posts: 5
Help please!

I want an ad slot in my PM template after first post. Any takers?

rb

Joined: Jan 2000
Posts: 5,830
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,830
Likes: 20
like i said in pm at central, it's doable but would take some work to do


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Okay, that took only 5 minutes smile

in /scripts/viewmessage.inc.php

find:
Code
	$user['USER_TOTAL_PM'] = $total_unread;

Add below:
Code
	$island_insert = get_portal_box("portal_box_3.php");

You can replace that number 3 there with any of the other custom boxes. It's hardcoded for simplicity of the hack. No sense in make more fuzz of it then the 2 line hack it is laugh

Just under it find
Code
		"online_status" => $online_status,

Add below:
Code
		"island_insert" => & $island_insert,

And yes, that's all there is to it.

It's a really simple hack, you just have to provide the $island_insert variable to the smarty template, and it will be displayed automaticly below post #1.

Sponsored Links
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Now we need a way to make these ads appear after say the 5th post in a thread or PM wink


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
That would be a major $10,000 dollar paid hack since you have to edit 2 files for that smile post_side.tpl and post_top.tpl and change the magic line in both smile

That's well beyond the scope of this topic wink

Last edited by blaaskaak; 10/15/2007 4:22 PM.
Joined: Dec 2002
Posts: 5
Lurker
Lurker
Joined: Dec 2002
Posts: 5
Hmm.

First off, HUGE thanks.

I'm running 7.1 and did the first add, but could not find in my viewmessage.inc.php file:

"online_status" => $online_status,

I tried putting the following in the smarty code, but no workee.

"island_insert" => & $island_insert,

Still no luck, Chuck.

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Hm, I don't have a 7.1 copy running, I run the latest version (7.2.2 at this time).

Basicly all there is to it is adding that
"island_insert" => & $island_insert, in the $smarty_data = array(

But ehr, 7.1 could be your show stopper anyhow for this simply hack. If I remember correct, the joined post_side.tpl and post_top.tpl which is used to display posts in both flat, threaded and private topic mode was introduced in 7.2

I would recommend an upgrade to 7.2.2.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Originally Posted by blaaskaak
That would be a major $10,000 dollar paid hack since you have to edit 2 files for that smile post_side.tpl and post_top.tpl and change the magic line in both smile

That's well beyond the scope of this topic wink


$10,000 on it's way wink


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Sponsored Links
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by Ian_W
$10,000 on it's way wink


/templates/default/post_side.tpl

Code
{if $smarty.section.post.iteration == 1}

replace with

Code
{if $smarty.section.post.iteration == say the 5th post}

The post_top.tpl hack I will post after receiving the funds smile

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
i'll only charge $9999

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
i'll only charge $9999


yeah right, ex taxes I'm sure. Don't fall for that old trick Ian laugh

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
yah, but i'll also throw in a slightly used version of Halo II laugh

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
I'll add a 3 star New Mario Bros Nintendo DS savegame, with everything unlocked. And yarp, played those 3 stars myself.

Joined: Jan 2000
Posts: 5,830
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,830
Likes: 20
always wondered how many stars you could get... lol


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by Gizmo
always wondered how many stars you could get... lol


Final Castle, alle exits, all coins... That last one took me ages laugh

Joined: Jan 2000
Posts: 5,830
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,830
Likes: 20
i guess i'm about 80% there, I have all castles done, probably all but 4 alt exits (2 ghost houses), and probably 80% of coins...

i've been really engrossed with Legend of Zelda, Phantom Hourglass; I'm a little over half way through, with the majority of minigames completed.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,570
Posts293,919
Members13,848
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,830
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 81
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2023 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)