• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Can I disable checking forums for "if read" on the homepage?

Phases

Active member
#1
I would like to NOT run the query that checks every forum listed on the home page site-wide against the read timers for each user that loads the homepage.

Can this be disabled/modified easily enough?

Thanks,
 
Last edited:

Brogan

XenForo moderator
Staff member
#2
I'm not quite sure I follow.

Is your home page a custom solution?
If so, just don't do any read marking data for any content and treat logged in members like guests.
 

Phases

Active member
#3
Well, yes it is fairly custom but it is the default XF homepage:

http://androidforums.com

When I refresh the page the following query is made:

Code:
SELECT forum.*
,
IF(forum_read.forum_read_date > 1416086650, forum_read.forum_read_date, 1416086650) AS forum_read_date
FROM xf_forum AS forum
INNER JOIN xf_node AS node ON (node.node_id = forum.node_id)

LEFT JOIN xf_forum_read AS forum_read ON
(forum_read.node_id = forum.node_id
AND forum_read.user_id = 275)
WHERE forum.node_id IN (2400, 2405, 12, 1745, 148, 43, 42, 117, 181, 1277, 1279, 174, 30, 2897, 1286, 2180, 32, 118, 2534, 2290, 2038, 1696, 1985, 1933, 45, 120, 2406, 4, 206, 1930, 5, 215, 226, 2776, 224, 2779, 2778, 2666, 501, 23, 6, 2759, 2760, 249, 2753, 2754, 1517, 1518, 159, 704, 2206, 2207, 2260, 2261, 2718, 2719, 1848, 1849, 2683, 2684, 373, 705, 2328, 2329, 2208, 2209, 2493, 2494, 2491, 2492, 2889, 2890, 2107, 2110, 2108, 2111, 2587, 2588, 2109, 2112, 156, 708, 2254, 2255, 2256, 2257, 2258, 2259, 2736, 2737, 1945, 1946, 2193, 2194, 2537, 2538, 2879, 2880, 2551, 2552, 2560, 2563, 2561, 2564, 2562, 2565, 1941, 1942, 2380, 2381, 2382, 2383, 2384, 2385, 2509, 2510, 836, 837, 2364, 2365, 1556, 1557, 1863, 1864, 164, 710, 258, 713, 2845, 2846, 1147, 1148, 656, 717, 163, 326, 327, 328, 198, 2531, 2532, 2661, 2662, 2397, 2398, 2831, 2834, 2458, 2459, 2637, 2639, 2638, 2640, 2832, 2833, 1713, 1714, 2891, 2892, 301, 302, 303, 304, 440, 655, 718, 2412, 2413, 2245, 2246, 1882, 1883, 375, 489, 490, 491, 463, 1949, 1950, 111, 168, 443, 444, 445, 123, 196, 201, 233, 238, 261, 697, 720, 1574, 1575, 698, 719, 2009, 124,

...multiply this by about 15, had to remove for character count in postings. But is is 2500 node ids.)


....only 16 of those forums show on the home page in a way that we would bother with marking read. Ideally I'd like to pick which or at least which categories to exclude or include - but I realize that wouldn't be easy.

I thought an easy solution would be, optionally, to experiment with disabling 'checking for read' altogether on the homepage.

How would I go about disabling altogether as you mentioned? I see "Read Marking Data Lifetime (Days)" but can't set below 1, and I see nothing in usergroup settings. Plus that would be global I'm only interested in playing with the home page.

Though, I guess the .03 sec it takes to run isn't a huge deal.

Appreciate the replies!
 
Last edited:

Phases

Active member
#5
I was hoping for a point in the right direction if it came down to that. ;) Could you move this thread to the appropriate section and add "how" to the beginning of the thread title for me? Maybe someone is just itching to give a tip or two. :)
 

Mike

XenForo developer
Staff member
#7
It's worth noting that that query is mostly about getting the forum information, not read marking data -- that data just comes along with it.
 

Breixo

Active member
#9
Hi @Phases
I was looking for a solution like yours at androidforums:
2015-10-25_2313.png
Firstly, having a Top3 subforums with its image at the top of the category.
Secondly, having only a selected group of "Top" subforums shown on homepage.

Is it something you can share? I'd love to have those features on my forums.
Kind regards
 

Phases

Active member
#10
This is something we had custom developed with a couple of our in house developers working together. It's not a traditional add-in that I could examine to give points in the right direction.

But basically we have a "page" node that we use to select which forums will be listed and which three of all those forums will be featured with the image, then the home page is custom built to pull those from the database. Wish I could help more!