Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
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

Joined: Jan 2010
Posts: 34
newbie
newbie
Joined: Jan 2010
Posts: 34
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)


Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Awesome!! Thank you so much, this will make a huge difference in our forum traffic!


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
Thanks Bella! smile


Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
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
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
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
There is no such thing as stupid questions. Just stupid answers
Joined: Jan 2010
Posts: 25
J
newbie
newbie
J Offline
Joined: Jan 2010
Posts: 25
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.

Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
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
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
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
There is no such thing as stupid questions. Just stupid answers
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
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

Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
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/ubbth...8239/Number/379866/fpart/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 - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
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


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
2 members (Nightcrawler, Ruben), 694 guests, and 214 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)