Previous Thread
Next Thread
Print Thread
Rating: 15
Page 6 of 10 1 2 4 5 6 7 8 9 10
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Thanks JustDave!!!

Sponsored Links
sjsaunders #223812 09/27/2002 6:40 PM
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
Dave, would it be terribly difficult to create a hack that would automatically make a copy of a poll when it's posted? (Huh? ) What I mean is, it definitely cuts down on the time for generation on the IIP to have all the polls in one forum. But with users posting polls in lots of forums, that means we either have to forego the pollspal or move the polls to the polls forum (that would be a chore!) But if, when a user posted a poll, it automatically could be copied to the polls forum (and the original would be left in the forum it was posted in) it would solve the problem. Unfortunately that sounds very complicated.

What about just the location of the poll being copied to a location? Like when a person makes a poll it automatically copies the thread number to a file, so that the IIP would only have to pull the information from that file, and not query the whole database. Would that make it as quick as having the polls in the same forum?

If you are just shaking your head at this point you can say so. I can live with a "you can't get there from here" answer.


[:"red"]Lisa[/]
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
[]I ran into the same problem: All the variable values cleared, and I'm not sure why (could have been due to poor connectivity between my PC and the server since I'm on ISDN in Italy connecting to web server in the States).

It was so bad that I FTPed the original config pal back up to the server, editted it again from the IIP editor page, and then backed up the config pal once I got it to work.
[/]

Yep, this happened to me this afternoon. I accidently left a / at the end of the url for the site and that made the whole thing blank out. So when Dave says "do not include the trailing slash", I guess he really means it!


[:"red"]Lisa[/]
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I agree that the poll pal can be a resource hog when figure out what to display and displaying it.

I have debated on a few routes to speed things up such as:

1. A dedicated poll feature, independant from .threads posts but with access based on groups. (I debate this about every 2 or 3 days) lol
2. Caching the poll display and results. (I started working on this but figured it was easier done with 6.0's poll pal because I have straightened a few things out so I can see what the heck I was doing... lol)
3. Add an index or two to the database to try and speed up the searches. (I have done this with some limited success in 6.0. It's not as good a search as it can be but it's better than it was)
4. Combine some information in the database to limit the number of queries. (I have done this with 6.0)

Now I think I understand your direction on this...

What would happen is that when ever a poll is posted it's information including title and options along with what board (to base access by) would be stored seperately. This dedicated pollpal data table would then need to store the post number, post date, board keyword, poll name, poll title, poll options, poll votes and total votes per poll.

addpost.php would need to store information in this new table when a poll is entered.
deletepost.php would need to remove this poll.
modifypost.php would need to update information related to the poll as well.
Any script that I'm forgetting that can modify a post will probably need to be gone over also.

The first route and this last one would be the fastest. The last one would also add a query to all .threads scripts that deal with posts and polls as far as modifying and storing information goes. One of the things that always stops me from really embeding some IIP code into threads as far as possible is that it will require the end user to do a lot of editing.

All input on this is welcomed. I do listen. (sometimes forget but not on purpose... lol)




PS. yep, I do mean it... no / means no /

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
You know, I didn't even try to do the poll using all public boards. I just assumed it would be too slow. Prior to v5.0, turning on all of the boxes made the index page have a load time of 40 seconds or so.

I imported about 300,000 posts, 4000 members. I turned on all of the boxes, including pollpal. I have it set to public, and admitedly I have the caches turned up pretty high on some of the boxes (particularly top 10 posters, because we've had a problem with people posting just to see their position move -- if they have to wait a couple hours to see it change it might not be as much fun )

Anyway, with everything turned on the load time is only:

Generated in 3.652 seconds in which 3.58 seconds were spent on a total of 35 queries.



I have it on a test board though, so there is no load (other than me ), but it's still on the same server as our regular board. Is it likely to change when I move it, or can I jump for joy now?

Question -- Under Top Posters, in the editconfig, you say, "Should we cache this information to increase page generation times? " You did mean "decrease", right? Increasing the cache time should decrease the generation time, right?

Also, does the shout box automatically refresh? Where is the time setting for that if it does?


[:"red"]Lisa[/]
Sponsored Links
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Yeah I mean increase speed, decrease generation times. I been sorta kicking myself for that wording lately... lol

I believe you'll get the same time results with your main board. Caching the various boxes helps a great deal and spreads the queires out so it wont be to often that one person lands with updating everything.

The shoutbox isn't cached so each page load shows exactly what's there at that moment. But after reading your question again I think you mean a meta refresh and no it doesnt. I left that out but I'll definately make it an option for the next release. My reasons were that I didn't think admins wanted a bunch of people killing 4 queries every x minutes as they watched the page reload and reload and reload... lol

I think it's 4, maybe 3... lol

Joined: Sep 2002
Posts: 7
Lurker
Lurker
Offline
Joined: Sep 2002
Posts: 7
Dave,

I am confused

You say '25. Template based "table wrappers" added to allow for easy customized design of pal boxes. A wrapper for AllenAyres' port of the Blam Ice templates by Bookie for .classic has been included in the wrapper template. More can be created, just follow the same layout as the ones listed in the template. '

Can you explain what this is - and is there a demo of it - is this site running this feature?

Sally

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
The home page here at threadsdev is using this.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Yep, what Josh said.

It's a template file for displaying the tables the pal boxes are in. ThreadsDev is an example of it in use.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Sally, these would correspond pretty closely to $TBT and $TBB in ubb.classic. It's a simple way to allow for customization of the tables and their surrounding html bits


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
I guess that it must be me, cause I have a small problem. My forum is not extremely busy (in terms of users and posts, but still the average is 100 posts a day.

I integrated 5.1 on it having the menu, top posters and profile spotlight on the left, welcome new member and last seen middle, search, login, short stats and a custom box on the right

I tried to put the hot topics in the middle. Indexes are fine, the box appears but before that I get an sql error.
code:

SQL ERROR: Unable to do_query: SELECT B_Number,B_Posted,B_Last_Post,B_Username,
B_Subject,B_Main,B_Replies,B_Counter,B_Board
FROM FFFF_Posts
WHERE B_Number = B_Main AND B_Posted >= '1033312400' AND B_Replies >= '5'
AND (B_Sticky = 0 OR B_Sticky IS NULL) AND ()
ORDER BY B_Replies DESC LIMIT 0,1
You have an error in your SQL syntax near ') ORDER BY B_Replies DESC LIMIT 0,1 ' at line 8



Obviously the error comes from the WHERE statement. I still cannot understand whether IIP will chache results according to the new posts from the minute it got installed or from the existing ones. If it is the latter, I am sure I have threads with more than 5 replies.

The same errors appear when I want to add the Current Threads, Past threads, Current poll, etc.

Any ideas anyone?

Warm regards

Nikos


Nikos
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
There's an empty AND () statement in there. My guess is that you have no boards open to the public or "guests". To fix this, edit your index.php file and find this:

code:

if (!$Groups || $forcepublic) {
$Groups = "-4-";
$groupquery = "AND Bo_Read_Perm LIKE '%-4-%'";
$Grouparray = split("-",$Groups);
$gsize = sizeof($Grouparray);
}



to this:

code:

if (!$Groups || $forcepublic) {
$Groups = "-3-";
$groupquery = "AND Bo_Read_Perm LIKE '%-3-%'";
$Grouparray = split("-",$Groups);
$gsize = sizeof($Grouparray);
}




What this will do is pull information that all members have access to. I'll have to add some checks in for this in 6.0 and I'll make it configurable so if it's a private board/site such as yours you will be able to set what the default group is when gathering information for display in IIP when "forcepublic" is on.



If this doesn't fix your problem let me know. I think it will from what I you have stated about your site.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Thanks Dave

A minute later... Magic!

That solved it perfectly. Maybe this can be a configuration option i.e. the index page to check if any of the forums are open to the public, and then change the $Groups to -3- from -4-.

Just a thought.

Thanks once more

Warm regards

Nikos


Nikos
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Yes that is a good idea. It'll be in for this next version.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I am aware of another site that is for "members" only and was thinking that since IIP 6.0 is templated it could be made to display a different index page to unregistered users or those not logged in. That way everything can be hidden from "guests" with perhaps an exception of a login box and what ever else that they are allowed to see.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I patched the newspal.php script in the attachment of this thread's main post. The problem was that the date was not being displayed correctly for sticky posts. If your not displaying sticky posts on your index page then there shouldn't be any problems and you probably can wait for IIP 6.0 which is fixed.

This patch for IIP 5.1 will still not be quite right because of a bug in .threads that causes the posted date of a sticky post to reflect the date of the last reply. If nobody replies to your sticky post then the displayed date in the newspal.php script will be correct. If they do then this date will reflect their reply date.



Edit Note: just download the zip and upload the new newspal.php script to your /pals directory and your set.

Last edited by JustDave; 10/02/2002 7:27 PM.
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
A quick question Dave,

Would it be possible in the short stats to have some averaging? For instance average messages per day?

I tried to do something about that but the dates on the messages are stored like integers and at the moment I am not that literate in mysql to decipher them into dates and group them.

I was thinking of something like getting the difference in dates of the first and last message posted divided by the total message count.

Warm regards

Nikos


Nikos
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I too have thought about some sort of bar chart displaying averages but haven't a chance to tackle it. I'll see what I can do for 6.0

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
for the forums such as our test forum, can they be eliminated from the 'current threads' pal? or is that part of the archived forum stuff you've talked about? a third of our current threads are test posts


- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll add a "AND B_Board != 'testboard'" to the current threads tonight.

That will fix that.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I have IIP set to overlook anything related to the "test" board.


The archive setup I have in my head wouldn't be able to help in this situation as it's a board that requires posts to be added. Archives would strictly be for reading only... with perhaps admins/mods able to modify existing archive posts.

I really do want to get around to doing the archive feature... never enough hours in the 30 hour day... lol

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
You get 30 hours?!?! Where do I sign up?



- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
LoL I think it's a bum deal though... I believe my life will end 6 hours earlier for each day I make it through... LoL

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I have added a change to the index.php page so that IIP's version check will work with both UBB.threads 6.1 and 6.1.1

Users that have upgraded to 6.1.1 will want to make this change to their index.php file:

Find this:
code:

if ($VERSION != "6.1"){
$VersionNotice = "<br /><br /><strong><span class="standouttext">Version missmatch!</span> IIP $palVersion will not work with UBB.threads™ $VERSION.</strong>";
}



and change it to this:

code:

if (($VERSION != "6.1") && ($VERSION != "6.1.1")) {
$VersionNotice = "<br /><br /><strong><span class="standouttext">Version missmatch!</span> IIP $palVersion will not work with UBB.threads™ $VERSION.</strong>";
}







That should do it.






Thanks goes to Billster2K for pointing this out to me. I have updated the .zip file attached to the main IIP post of this thread to include this change.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
If you could only have seen my face when I upgraded to 6.1.1 and then I went to my index page...

Thanks JustDave!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
LoL I hadn't really given it any thought untill it was pointed out. Just keep adding versions if there is another 6.1.x released. There won't be any database changes or anything drastic till UBB.threads 6.2 so it should work with anything 6.1.x

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It's odd.... I'm still running IIP 5.0 and threads 6.1.1 and I never had a problem. <SHRUG>

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This is odd.... dont' know if it's a blam template thing....
But for me.... this post (and my last one) is on page 16.... but at the top of the thread.... it only lists pages 1-15.... I had to "show all" to get to it or manually change fpart to 16 in the url. <SHRUG>

Last edited by JoshPet; 10/06/2002 4:50 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I have had that happen to me before but not with the blam templates. It doesn't happen often so that's the problem. Also, I have less pages because I'm viewing more at a time so your page 16 is my page 12. Not sure if having the different number of posts per page helps or not.

Have you ran editconfig.php from your admin directory and updated the .threads version number?

If not then IIP still thinks .threads is 6.1

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ha...
with your post here (the third on page 16 for me) page 16 appeared. <SHRUG>

Yup the bottom of my screen does say 6.1.1.

I may have been running an earlier version of 5.0 though.... it's OK because it didn't break..... this is what I've got.

$VersionNotice = "";
$versionCheck = split("\.",$VERSION);
$versionCheck[1] = str_replace("b1","",$versionCheck[1]);
$versionValue = "{$versionCheck[0]}{$versionCheck[1]}";
if ($versionValue != "61") {
$VersionNotice = "<br /><br /><strong><span class="standouttext">Version missmatch!</span> IIP $palVersion will not work with UBB.threads™ $VERSION.</strong>";
}

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Yeah that code there works no matter what minor version number is tacked on.

I probably should have put it back that way... oh well.

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
Just updated everything and I have only run into ONE problem...

I have 4 sections that I use to post news in, but if I edit with the online editor, it kills the fourth news source. Any ideas?


Silly ricer.. Wings are for airplanes!
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I was really proud of myself cause I had just used Beyond Compair for the first time to add all my hacks to a new release of Threads and it worked perfectly. Then I went to my index page and my chin hit the floor...

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Best to edit manually then as the online editor only allows for 3 forums to be used for news.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Hey JustDave,
I've noticed that the max online in the short stats box hasn't changed on my site since I installed IIP, and I've seen more than 24 people on my site. The cache was set to 30 by default, but I dropped it to 10 to see if it would update (no joy).

I could try setting the cache to 0, but I was wondering if there was a bug in the part of the script that checks for the total online.

Thanks in advance for your time (I know that, like me, you never have enough)!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
The Short Stats "max online" is set by the "Whos Online" pal box which is checked at every index page load. If your not displaying the "whos online" information on the index page then this information will not be tracked. This Short Stats information is indeed cached though but as far as the max online data goes it is updated in the cache field at every page load.

The only way this information can be stored is if someone loads the index page so that the "whos online" pal box can count the users and store them. If nobody enters your site through the index page this information will not be stored.

I'm not sure what to say about this though. I have looked things over and can't see where it would be going wrong.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Regarding the average number of messages and since I am really bad at deciphering the way dates are stored in the posts table, I managed to get something going here:

If you use the following query:
code:
SELECT COUNT(*) / (DAYOFYEAR(NOW()) - DAYOFYEAR(FROM_UNIXTIME(MIN(B_Posted)))) As AveragePostsPerDay FROM w3t_posts



then this will return the average number of posts per day. Of course you need to add that query with the usual call to the database and the result to be passed in a local variable, which you will then use it in the shortstatspal.php to be displayed.

Major limitation (and it's my lack of knowledge to blame) is that it uses the DAYOFYEAR function which works for the current year. It works fine for me since my forum was created this year but I haven't found (yet) the way to find the difference in days between the first and last message. Also I have not run any metrics against it. My board has only 5000 messages so I don't know how this will affect others with 10 or 100 times as much messages.

Another workaround for a faster query (to get the COUNT() of messages) is to query the boards table. Alternatively for fastest access one needs to create a table with the date of the first post, the date of the last post and the message count. The last two fields can be updated when a post is made.

Still trying, but I will find it in the end.

Warm regards

Nikos


Nikos
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
I possibly had the same face Dalantech as you did but I quickly went into the index.php and changed the 6.1 to 6.1.1

Brute hack but it worked in a second.

Warm regards

Nikos


Nikos
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Thanks JustDave! I've enabled the "Who's Online" PAL box

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I'll be doing the same thing if there is another point release

Page 6 of 10 1 2 4 5 6 7 8 9 10

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)