|
Tuesday, August 08, 2006(UTC)
|
|
Sunday, May 17, 2009 10:51:12 PM(UTC)
|
33 [0.09% of all post / 0.02 posts per day] |
|
0
(View Thanks)
|
|
0
|
|
0
|
View All Posts by User
You are correct - I just verified that behaviour on my forum as well: Subforum posts are only updated on the main page if the parent forum has posts or you manually put a value in the "LastPosted" column of that parent forum
|
chriscoe71 wrote:This has been confirmed. If the Parent forum doesn't have any posts in it, then the code jumps out and doesn't look for child forum posts.
See /controls/ForumLastPost.ascx.cs beginning at Line 52.
LaB, can you confirm that this is the same reason you are not seeing the Last Post?
Unfortunately, I'm great at tracking down problems, but not so great at actually fixing them. Yup - same scenario here ... parent forum has no posts. There doesn't seem to be anything wrong with the code logic though,as the trigger updating the parent forums has been commented out of the install scripts (I'm assuming it wasn't finished, as if I uncomment it and fix the syntax errors, the database goes into an infinite loop), and thus there never will be anything other than null values in the LastPosted column for that forum.
|
Am I seriously the only one having this issue? How are updates handled, if not through the triggers that apparantly don't exist anymore? the yaf_message_approve SP contains the code to update the forum the message is directly posted to, but not the parent forums: Code:-- update Forum table with last topic/post info update [dbo].[yaf_Forum] set LastPosted = @Posted, LastTopicID = @TopicID, LastMessageID = @MessageID, LastUserID = @UserID, LastUserName = @UserName where ForumID = @ForumID
|
Hello all, Using 1.9.3 RC2, I noticed today, that the Last Post column doesn't update when posts are made in subforums. I looked in the Triggers.sql install file, and noticed that the trigger was commented out. Is there a new way of updating the database, or am I missing something? Code:/* ** Triggers */
if exists(select 1 from sysobjects where id=object_id(N'[{databaseOwner}].[{objectQualifier}Active_insert]') and objectproperty(id, N'IsTrigger') = 1) drop trigger [{databaseOwner}].[{objectQualifier}Active_insert] go
if exists(select 1 from sysobjects where id=object_id(N'[{databaseOwner}].[{objectQualifier}Forum_update]') and objectproperty(id, N'IsTrigger') = 1) drop trigger [{databaseOwner}].[{objectQualifier}Forum_update] go
/* CREATE TRIGGER [{databaseOwner}].[{objectQualifier}Forum_update] ON [{databaseOwner}].[{objectQualifier}Forum] FOR UPDATE AS BEGIN IF UPDATE(LastTopicID) OR UPDATE(LastMessageID) BEGIN -- recursively update the forum DECLARE @ParentID int
SET @ParentID = (SELECT TOP 1 ParentID FROM inserted) WHILE (@ParentID IS NOT NULL) BEGIN UPDATE a SET a.LastPosted = b.LastPosted, a.LastTopicID = b.LastTopicID, a.LastMessageID = b.LastMessageID, a.LastUserID = b.LastUserID, a.LastUserName = b.LastUserName FROM [{databaseOwner}].[{objectQualifier}Forum]] a, inserted b WHERE a.ForumID = @ParentID AND ((a.LastPosted < b.LastPosted) OR a.LastPosted IS NULL); SET @ParentID = (SELECT ParentID FROM [{databaseOwner}].[{objectQualifier}Forum] WHERE ForumID = @ParentID) END END END */ GO
if exists(select 1 from sysobjects where id=object_id(N'[{databaseOwner}].[{objectQualifier}Group_update]') and objectproperty(id, N'IsTrigger') = 1) drop trigger [{databaseOwner}].[{objectQualifier}Group_update] GO
if exists(select 1 from sysobjects where id=object_id(N'[{databaseOwner}].[{objectQualifier}Group_insert]') and objectproperty(id, N'IsTrigger') = 1) drop trigger [{databaseOwner}].[{objectQualifier}Group_insert] GO
if exists(select 1 from sysobjects where id=object_id(N'[{databaseOwner}].[{objectQualifier}UserGroup_insert]') and objectproperty(id, N'IsTrigger') = 1) drop trigger [{databaseOwner}].[{objectQualifier}UserGroup_insert] GO
if exists(select 1 from sysobjects where id=object_id(N'[{databaseOwner}].[{objectQualifier}UserGroup_delete]') and objectproperty(id, N'IsTrigger') = 1) drop trigger [{databaseOwner}].[{objectQualifier}UserGroup_delete] GO
|
jshepler wrote:I don't see what the problem is - the space is still rendered. It's just part of the clickable link.
However, you can fix it by changing the matching regex - the part at the end that's "[^.]" to include a space "[^. ]" so that it won't include the space after the url in the match.
That exactly is the problem... the space is rendered inside the anchor tag instead of outside - however, you posted the solution - to include the whitespace in the regex; \s would be a better fit though: [^.<\s]
|
fseries wrote:I have the URL rewriting on for my site. However it has "yaf_topics2_".... in he url. Is there anyway to remove the "yaf_topics2" from the link below. So I would have Code: http://www.mylapbandexperience.com/forum/Introductions.aspx
-- instead of --
http://www.mylapbandexperience.com/forum/yaf_topics2_Introductions.aspx
not without a serious rewrite of the code as topics2 points to the topic ID in the database - http://www.mylapbandexpe...ics2_Introductions.aspx
and http://www.mylapbandexpe.../forum/yaf_topics2.aspx
points to the same page, as the description is there merely for SEO.
|
I solved it by adding a whitespace after the end of the anchor in the FormatMsg class Code:"${before}<a {0} {1} href=\"${inner}\" title=\"${inner}\">${innertrunc}</a> ".Replace( "{0}", target ).Replace( "{1}", nofollow ), this is a hack, and I would really appreciate it if anyone could look through the regex and come up with a cleaner solution.
|
PG-13 wrote:How can I remove the large YAF header at the top left of my sites forum and replace it with the site logo? HTML for dummies:  default.aspx - change the following line to point to your logo... Code:<img src="~/images/YAFLogo.jpg" runat="server" alt="YetAnotherForum" id="imgBanner" /><br/>
|
I noticed the following cosmetic flaw in the URL truncating: If a space is inserted after a long URL http://www.bestbuy.com/s...sstorelocatorsearch.jsp like so; that space is included in the display property of the anchor, instead of being outside the anchor tag as intended. This only applies to truncated URLs, as short URLs aren't affected: www.google.com test I have looked through the regex and truncate sections, and have not been able to come up with where the bug might lie. If anyone could direct me to the proper place, I'd appreciate it.
|
Some.Net(Guy) wrote:That's from http://dev.mysql.com/tec...-from-microsoft.html... stored procedures are dumb anyways. Why not bring them all onto the server side? Plus if you continue to use stored procedures, only people w/MySQL 5+ will be able to use your implementation. I know that my host is still at 4.1x or something. What do you think stored procedures are, if not server side?
|
|