Results 1 to 17 of 17

Thread: Cache for guests and forum integration

  1. #1

    Exclamation Cache for guests and forum integration

    A "little" problem with the new (amazing) "home page cache for guest" feature.

    When i turn that option on (60, 600, 900 or any seconds, just activate it) the home for guest is cached ok...
    ...but the guests can't navigate thought forums if the "forum integration" is activated. They see the forum columns (columns from pageid that is integrated into the forums, ok with that) but in the "custom content" place, where the forums suppose to appear, the same cached copy of the home page is showed. No forum index, forumdisplay, showthread or forum-content is displayed, just that cached copy of the homepage everywhere (and the navbar show breadcrumb well pointed to the thread or forum, but the content in the "center column" always is the cached home page).

    If i deactivate forum integration, and even just disable the "vBa CMPS - Integration Startup" plugin (init_startup), the columns in forums disappear (as expected) and guest can see and navigate the forums normally.

    Happen in live (vb 3.6.8 pl2) with the last vbadv3.0.0 gold (the updated package).

    Hope this can be fixed.
    Cache home page for guest is a very big feature for a big-board (and we are a big-board).

    Greetings
    Last edited by TCattitude; 02-06-2008 at 10:05 AM.

  2. #2

    Default Re: Cache for guests and forum integration

    ./includes/vba_cmps_include_top.php

    Line 649.
    Change this:
    Code:
    define('USE_VBA_HOMECACHE', (!$vbulletin->userinfo['userid'] AND $vba_options['portal_guestcache'] AND $vbulletin->adv_portal_pars['lastupdate'] + $vba_options['portal_guestcache'] >= TIMENOW ? true : false));
    Into this:
    Code:
    define('USE_VBA_HOMECACHE', ($pages['name'] == 'home' AND !$vbulletin->userinfo['userid'] AND $vba_options['portal_guestcache'] AND $vbulletin->adv_portal_pars['lastupdate'] + $vba_options['portal_guestcache'] >= TIMENOW ? true : false));
    The adition of $pages['name'] == 'home' AND at the beginning of the "define" seems to solve the problem. Just like the other conditional in line 528 for portal_guestcache.
    Now the guest view the cached home, and can view forums and threads without problem even if the forum integration is enabled.

    Hope this help some else.
    Last edited by TCattitude; 02-06-2008 at 10:42 AM.

  3. #3
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Cache for guests and forum integration

    Thanks for pointing that out. I've went ahead and applied that fix to the download package here as well, so if anyone is reading this and doen't want to manually make the changes, just download the files from here again and upload the /forum/includes/vba_cmps_include_top.php file over your existing one and that should take care of the problem.

  4. #4

    Default Re: Cache for guests and forum integration

    Thanks for the update, Brian.

    One suggestion about this same thing:
    An option (below the setting to activate this feature) to select what usergroups are affected by the "home cache", to allow not only guest to help in saving bandwidth. Some usergroups, like "normal registered" in our case (a big-board) doesn't need a full-always updated home page. Maybe some people totally doesn't need a fully updated on the fly home page, and update it between five or teen minutes is fine for that. 10 minutes without too many querys (per block), with 100k pageviews a day for example, is a big resource-save thing.

  5. #5

    Default Re: Cache for guests and forum integration

    I ran into this same problem so naturally I removed any value in that config setting to not cache the home page at all and then I ran into a NEW problem for guests as seen in the attached screen capture. Guests could no longer see images in the News block whereas they could previously with RC2.

    I will go ahead and download the fix and re-enable home page caching but for those who don't want to cache I think there may still be an additional bug.

  6. #6
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Cache for guests and forum integration

    TCattitude - I had thought about making a cache available for other groups. Since the cache is stored in the datastore table though, there's not really a good way to pull a cached page based on usergroup. Plus I'm thinking something like that might confuse some members and might not work very well with modules that have permissions applied or ones like the Welcome Block where it displays data about the user.

    KenDude - It looks like you have your permissions set not to allow guests to view attachments or threads. There was a small bug that was recently pointed out that could cause the broken images instead of showing the small .gif image and link. If you will download the files from here again and replace your current modules/news.php file with the updated version from the download package, that should fix the problem.

  7. #7

    Default Re: Cache for guests and forum integration

    Ugh, no now I did as you suggest Brian and even with caching the home page the GIF images for inline attachments don't show up! Is there a fix for this??? Feel free to check my site www.caymanclub.net so you can see what is going on.

    I have been over this dozens of times, the unregistered/not logged in group has permission to upload and download attachments, in the News Module I have it set so that forum permissions are not applied (per your instructions on how to set up teaser news items that could be read on the home page but when clicked on will ask the person to log in).

    IN the module itself I have the following settings:
    Enable Attachments: No (that way the pic of the attachment doesn't show up below the message and will showup inline with the tags
    Apply Forum Permissions: No (otherwise I cannot generate "teaser" news items)
    Show attachment paperclip: No
    Enable Attach BB Codes: Yes


    Ah I think I found it, at the top where it asks if I even want to "initialize" the forum permissions I had that set to Yes. I changed it to No and now the attachment GIFs show up (unless they are just showing up in a cache) Hopefully this helps you out.
    Last edited by KenDude; 02-08-2008 at 03:30 AM.

  8. #8
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Cache for guests and forum integration

    Your attachments are still showing up as broken images for me, and it seems to be because you have your permissions set not to allow guests to view attachments.

  9. #9

    Default Re: Cache for guests and forum integration

    Yep still broken, can you tell me exactly where I allow guests to view attachments? I cannot seem to find any such setting anywhere in vbulletin, I found settings for letting them download or upload attachments (and I turned those to YES for guests) but where is this mystery setting to allow them to View attachments???

  10. #10
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Cache for guests and forum integration

    Actually... It seems that you're not allowing guests to view threads either, so it sounds more like the original problem I mentioned above. I also see that the last time you downloaded the CMPS was on 2/6, so it doesn't look like you tried my previous suggestion of downloading the files from here again and replacing your modules/news.php file with the updated version.

  11. #11

    Default Re: Cache for guests and forum integration

    Yes last D/L as 2/6/08 at 7:40pm, I thought that was new enough, I will go grab it again and install the newest news module, I just thought that 2/6 was new enough.

    With respect to permissions in a separate topic you advised me to turn off "Apply Forum Permissions" for the News module, that would allow guests to see the news items on the Home page, but NOT be able to read them in the forum unless they logged in. This is what I call a "teaser" News item.

    Are you saying I cannot have teaser news items because if I do the images for the attachments won't show up? Or are you saying something else?

  12. #12

    Default Re: Cache for guests and forum integration

    I just re-downloaded again (It says newest version is 2/4/08) and the news module is 28,531 bytes, the exact same size as what was on my server already, I overwrote it anyway. So the issue is not the version of the news module that I am using.

    I hate having to keep bugging you in this forum thread, is there a way we can communicate directly on the issue to resolve it? I am happy to call you direct if need be.

  13. #13
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Cache for guests and forum integration

    Sorry, but we do not provide support by any other means besides the forums and support tickets. I've done some testing/debugging locally though and I see what's causing the broken images. I assumed vB handled permissions better when using the [attach] tag, but apparently they use a different method to sort of "trick" their files into thinking that the thumbnail should not be displayed. I've just applied some similar code to the modules/news.php file and updated the download package here, so if you will download the files again and replace your modules/news.php with the updated version, that should at least replace the broken images with a text link to the attachment instead. Unfortunately because of the way attachments are handled by vB, I don't think there's going to be an easy way to still display the thumbnail though without allowing guests to also view threads.

  14. #14

    Default Re: Cache for guests and forum integration

    See, I'm not insane.

    Ok here is what I did, although I may still try what you recommend in your topic but I'd like a picture not a text link so what I did was edit the usergroup of Unregistered / Not Logged in and found the item for view attachments and changed it to Yes.

    Now lurkers can see attachments wherever they are in the forums and see the attach tag images on the home page. I still don't let them read news items unless they are logged in so I am still accomplishing teaser news items. What I am losing is teaser attachments throughout the forum, now lurkers can see them instead of getting the text link which if they click on it asks them to log in.

    I would have hoped that telling the news module to ignore forum permissions would mean that you could simply force it to show the attachment images using the attach tag regardless of the actual forum permissions for the forum that the new item resides in.

    Since the whole reason I started using the attach tags was so that I could have a standardized image size for news items and have the text flow to the left or right using the [attach=left] or [attach=right] command, could I have just uploaded an image to my server and used [img=left] or [img=right] and achieved the same thing? If so that would bypass the need for the attachment images anyway as long as I manually made all my images the same size.

    Off to experiment...

  15. #15

    Default Re: Cache for guests and forum integration

    As it turns out there is no placement within the default img tag so I have developed a solution see:

    http://www.vbulletin.com/forum/showt...20#post1503020

    Which is what I will probably start using on my site and turn the ability to see attachments off for visitors.

  16. #16

    Default Re: Cache for guests and forum integration

    Ugh now that I am using my new system I am trying to find where I found a setting for view attachments and turned it on because I need to turn it back of! Can you help me out?

  17. #17
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Cache for guests and forum integration

    Admin CP => Usergroups => Usergroup Manager => {select group} => Forum Viewing Permissions => Can Download Attachments

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. REQ: Module cache
    By HenrikHansen in forum "How Do I..." Questions
    Replies: 6
    Last Post: 07-09-2007, 08:38 AM
  2. About Forum Integration
    By Gri in forum "How Do I..." Questions
    Replies: 3
    Last Post: 06-03-2007, 01:03 AM
  3. Problem with Forum Integration...
    By Jaxel in forum "How Do I..." Questions
    Replies: 7
    Last Post: 02-20-2007, 07:28 PM
  4. Cache Templates?
    By WiBu in forum Troubleshooting / "How do I..." Questions
    Replies: 3
    Last Post: 05-09-2005, 06:40 PM
  5. Forum Integration with CMPS...
    By Jason McConnell in forum Troubleshooting / "How do I..." Questions
    Replies: 15
    Last Post: 02-21-2005, 07:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •