Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
5 registered (Gizmo, GregK, Iann128, SteveS, SD), 34 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 04/22/10
Posts: 5
Top Posters (30 Days)
Ruben 61
SD 52
Gizmo 48
gliderdad 33
Dunny 21
driv 18
dbremer 16
Mark S 13
Stan 12
Iann128 10
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 2 1 2 >
Topic Options
#238240 - 07/27/10 05:11 AM Recent Posts - Exclude Specific Ones
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
I've been trying to wait on this request for Version 8 to come out, to see if it would handle it, but I think I really need to find SOME way to get this working on 7. It is really killing our traffic.

We used to have the sidebar of our BellaOnline.com forum show all recent posts. It really made for lively conversations and back-and-forth. However, we have a few 'games' that run in the forums and they would often end up being the ones that featured, which then interrupted the actual discussion forums. After a number of discussions in here about ways we could handle this, we finally went to a layout where we showed recent brand new topics, not just posts. That way the games, which were begun years ago, wouldn't show up.

However, it now means you have no quick way of seeing when a discussions is going on. You have to go digging them out of the actual forums (we have 400 forum areas). So the forum traffic has really dropped as a result. Which is not good.

I need *some* way of having that sidebar show all the recent posts - but exclude the specific threads that have the games in them. There must be some way to edit the code so it doesn't update that list if a thread matches a certain set of IDs.

Any thoughts?
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#238241 - 07/27/10 09:18 AM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
Dunny Offline
addict
Registered: 01/16/08
Posts: 427
Loc: DE USA
Bella I am not sure if this can be done (as many things that you do on your site I don't have on mine) however, could you set permissions up for those game forums where they are not in the recent posts box? I seem to remember that there is a way to make a forum not be reported as a featured forum... I will look and see if I can find the button in the control panel..but seems to me that with all the permissions we can edit there, that there is something there either in forum permissions or in site permissions that does this. (though I could be wrong, as I have never actually had to do any of that).

Dunny
_________________________
Dunny

http://forums.iskirra.net

Dawn of Iskirra
Top
#238243 - 07/27/10 09:59 AM Re: Recent Posts - Exclude Specific Ones [Re: Dunny]
Scott Young Offline
newbie
Registered: 01/03/10
Posts: 35
Loc: Virginia
It's possible. If you're just using the standard post islands, then what you'll need to do is get the list of TOPIC IDs that you want to exclude. You then need to edit the cache_builders/post_island.php file. Look for a query around line 70 or so. You'll see a portion that has the following code:

Code:
        and t1.TOPIC_LAST_REPLY_TIME > $one_month
        and t1.TOPIC_STATUS <> 'M'


Right after that, add the following. A comma delimited list of your TOPIC IDs that you want to exclude. I'm using 2,4,6,8 as an example.

Code:
and t1.TOPIC_ID NOT IN (2,4,6,8)

Top
#238274 - 07/28/10 01:55 PM Re: Recent Posts - Exclude Specific Ones [Re: Scott Young]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
Awesome!! Thank you so much, this will make a huge difference in our forum traffic!
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238307 - 07/30/10 04:04 AM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
Dunny -

I've done a lot of customization on my forums over the years - most of the code should be here in the forums. If you have a question about something feel free to ask!
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238311 - 07/30/10 06:25 AM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
Dunny Offline
addict
Registered: 01/16/08
Posts: 427
Loc: DE USA
Thanks Bella! smile
_________________________
Dunny

http://forums.iskirra.net

Dawn of Iskirra
Top
#238316 - 07/30/10 02:59 PM Re: Recent Posts - Exclude Specific Ones [Re: Dunny]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
OK I think it's not quite working correctly? My code reads:

and t1.TOPIC_ID NOT IN (440794,613732,613731,613729,464338,528073,440794,396215,379866,613475)

I put that in yesterday. However when I look at the forum today, one of the featured threads is this one -

http://forums.bellaonline.com/ubbthreads.php/topics/528073/Town_ABC_Game#Post528073

That shouldn't be showing up in the list, right?
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238317 - 07/30/10 03:03 PM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
Another featured post is this one -

http://forums.bellaonline.com/ubbthreads.php/topics/379866/Word_Association_Game#Post379866

which is also in the ID list.
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238319 - 07/30/10 03:06 PM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
OK just to cause a bit more trouble, that query there we're playing with is bringing back and entire MONTH of data, which is HUGE. So every time the database is creating that query it's working with gobs of data, while all it wants is the last 10 entries, which happened within the last hour.

Can I at least change this so it only works with the last day? Surely that would speed up the query vastly, and not unnecessarily bring in the other 29 solid days worth of data in the results set.

Is this query used for anything else besides that "recent posts" island?
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238323 - 07/30/10 04:14 PM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
Ruben Offline

Registered: 12/20/03
Posts: 4268
Loc: Lutz,FL
I assume you are referring to the "Brand New Posts" island on your site.
It seems okay now possibly the cache was in play at the time.

There is a topic called food game but it is not on your list.

On the one month value.
All it does is exclude anything older than a month.
Even if you allowed 2000 posts in the island the default would only go back 30 days to display.
In your case you limit it to ten posts.
And you have quite a bit of traffic.
If you want to change it search for.
Quote:
$one_month = $html->get_date() - (86400 *30);

Around line 70 on the same file.
The 86400 is the number of seconds per day.
the value of 30 makes it days.
So if you want say 14days change the 30 to 14.

If you start seeing less that ten posts in the island then it is because there are less than ten in 14 days.
_________________________
Blue Man Group
Top
#238325 - 07/30/10 05:01 PM Re: Recent Posts - Exclude Specific Ones [Re: Ruben]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
Yes - the Brand New Posts - I just went back and hit refresh again and it shows

Brand New Posts
Word Associations
by skyhaven
Soap Operas
18 minutes 21 seconds ago
Town ABC Game
by skyhaven
Folklore and Mythology
19 minutes 14 seconds ago
Food Game
by skyhaven
Card Games
20 minutes 31 seconds ago
Word Association Game
by skyhaven
Walking
21 minutes 48 seconds ago

So it's showing the games as recent - it's still including them in the list.

I'm just logged in as "Lisa" - not as a site administrator - so I should be seeing what other people are seeing.

Any ideas?
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238328 - 07/30/10 05:20 PM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
Ruben Offline

Registered: 12/20/03
Posts: 4268
Loc: Lutz,FL
Well it is Scott's hack .
But anyway I would check the post island settings.
Island Type= New topics only or Recent Posts.
It looks like it may make a difference.

Scott where are you?
_________________________
Blue Man Group
Top
#238336 - 07/30/10 05:41 PM Re: Recent Posts - Exclude Specific Ones [Re: Ruben]
Jake Katan Offline
newbie
Registered: 01/03/10
Posts: 25
Loc: Everett, Washington
From looking at your post and the IDs that your excluding those numbers are pretty big and look more like POST_IDs and not TOPIC_IDs. Maybe they really are the TOPIC_IDs but to be sure, when looking at the post, go to something like Move/Merge this topic and make sure you are using the number from there.
Top
#238338 - 07/30/10 05:49 PM Re: Recent Posts - Exclude Specific Ones [Re: Jake Katan]
Ruben Offline

Registered: 12/20/03
Posts: 4268
Loc: Lutz,FL
For my own info.
Where do you see the topic id number using the move merge option?
Depending on what method you use sometimes you see it in the browser url but not always.
_________________________
Blue Man Group
Top
#238341 - 07/30/10 06:16 PM Re: Recent Posts - Exclude Specific Ones [Re: Ruben]
Ruben Offline

Registered: 12/20/03
Posts: 4268
Loc: Lutz,FL
Okay Bella I think I figured this out on my own, After Jake's comment.
By looking at the tables.
You can't just open a topic looking at the first post number.
While viewing the first post on a topic use the move/merge option on the manage topic tab.
You will see a different number in the url in the browser.
For me looking at a post on my site.
In the header it shows #7604 but after selecting the move merge the actual Topic id is 1718.
It is in the browser url window. And it matches the table in the database.
Or you can dig in the table in the database.
_________________________
Blue Man Group
Top
#238371 - 07/31/10 02:57 PM Re: Recent Posts - Exclude Specific Ones [Re: Ruben]
SD Online   partay
Registered: 04/19/07
Posts: 4031
Loc: SoCal, USA
you are mixing up TOPIC_ID and POST_ID

for example, the url to THIS topic has ../topics/238341/...

in it..

that doesn't mean it is the topic id.. it is really the POST_ID for Ruben's last post.. that i am replying to

so to exclude a specific topic, you really want to look @ the 1st post in the topic (#238240 - Tue Jul 27 2010 02:11 AM -- for this topic)

and change the query to t1.POST_ID NOT IN (bla, bleh, blah)...

the ubbt_TOPICS table stores the POST_ID of the 1st post in it, so bada bing... ca ching wink

:2c:
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#238379 - 07/31/10 03:35 PM Re: Recent Posts - Exclude Specific Ones [Re: SD]
BellaOnline Offline
addict
Registered: 06/12/06
Posts: 515
I did think about the whole topic ID / post ID issue, so in each case I went back to the very first post in the thread to see what its ID was.

So let's take the "Word Association Game" in the walking forum. If you click on it to see the latest entry, you get sent to

http://forums.bellaonline.com/ubbthreads.php/topics/613941/Word_Association_Game#Post613941

So then I go to the Walking forum's main page, and I click on the thread from there, to see its main entry from the beginning. which is this -

http://forums.bellaonline.com/ubbthreads.php/topics/379866/Word_Association_Game#Post379866

I can see the post ID number in the top right corner of that very first post, and indeed its ID is 379866. The second post has an ID of 380329, the third one has an ID of 380322, and so on. So the very first post is definitely the 379866 number. The last posts in that thread are up in the 600,000 range.

So if you look at my SQL statement, the line currently reads:

and t1.TOPIC_ID NOT IN (440794,613732,613731,613729,464338,528073,440794,396215,379866,613475)

So the 379866 is definitely there in that list. But yet looking at the sidebar, that thread is being featured.

Now this still might bring up a different issue. I am comfortable that I am giving the post ID of the very first post in the entire thread - and I assumed this matched the topic ID for the whole thread. Could it be that the topic ID is NOT the post ID for the very first entry?

When I go to Topic Options and use the "Add Topic to your watched Topics" for this walking thread, the URL it gives is:

http://forums.bellaonline.com/ubbthreads...1/what/showflat

So I see the 379866 in there - but I also see a 58239. Is that 58239 the topic ID?

I'll give that a shot right now and see if that does the trick!
_________________________
Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums
Top
#238382 - 07/31/10 03:39 PM Re: Recent Posts - Exclude Specific Ones [Re: BellaOnline]
SD Online   partay
Registered: 04/19/07
Posts: 4031
Loc: SoCal, USA
Originally Posted By: bella-unit
Could it be that the topic ID is NOT the post ID for the very first entry?


yes, and my post says to change the SQL from ( i highlighted it in different color above):

t1.TOPIC_ID NOT IN ...

to

to t1.POST_ID NOT IN ...

there is both a TOPIC_ID and a POST_ID in a ubbt_TOPICS record.. they are two distinct things..

- from what you have above - just change to:

Sql Query:
and t1.POST_ID NOT IN (440794,613732,613731,613729,464338,528073,440794,396215,379866,613475)


Scott's post (sql syntax) is correct, if you know the topic ids, but that value isn't easy to see and POST_ID suffices just the same and is stored in the ubbt_TOPICS table as the POST_ID of the 1st post in that topic wink
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
Page 1 of 2 1 2 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Edit Post
by Bert
Today at 01:19 PM
A positive note
by SteveS
Yesterday at 09:36 PM
How to locate links to particular site if they are only used in images?
by Conrad
02/10/12 09:41 PM
Pictures not displaying
by Marker23
02/09/12 10:04 PM
Issue with logging out constantly
by Flanuva
02/09/12 07:05 PM
Forum Stats
10214 Members
36 Forums
33668 Topics
180918 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image