Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Can any one help with this ?
JimR Offline
Junior Member
**
Posts: 15
Joined: Jun 2012
Post: #1
Can any one help with this ?
Hi
I have produced a very big xthreads forum ... it uses just over 200 thread fields....  
I have just a few questions :-

1) how can I revert the field to show in every forum (if I have previously selected a forum for the field) without running a database query ?

2) with this amount of fields it is difficult to keep track of the tab order, I have set them all to 1 in the hope that when displayed they would tab in the order that I got them to display in but in fact they display in the order I added the field ... I guess the answer is to add a tabindex tag to the html in the templates but I was hoping there may be an easier way if I add a few more fields.

3) I need to total some values, I have added a total field after the fields I wish to total and set it's blank value to be something like this

PHP Code:
 
$p2tot=$GLOBALS['threadfields']['p2p']*$GLOBALS['threadfields']['p2q'];
$p3tot=$GLOBALS['threadfields']['p3p']*$GLOBALS['threadfields']['p3q'];
$GLOBALS['threadfields']['total']=$p2tot+$p3tot
this I guessed when I hit save post this would post the total to the variable $GLOBALS['threadfields']['total']

but it does not seem to do it

4) Could you add a field that identifies the fid as well as the tid in the table 'threadfields_data' so I could do some queries on the database to total a value from a forum.

09-13-2012 09:03 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Can any one help with this ?
(09-13-2012 09:03 AM)JimR Wrote:  1) how can I revert the field to show in every forum (if I have previously selected a forum for the field) without running a database query ?
Typically you can use the Ctrl key to select/unselect items.

(09-13-2012 09:03 AM)JimR Wrote:  2) with this amount of fields it is difficult to keep track of the tab order, I have set them all to 1 in the hope that when displayed they would tab in the order that I got them to display in but in fact they display in the order I added the field ... I guess the answer is to add a tabindex tag to the html in the templates but I was hoping there may be an easier way if I add a few more fields.
There isn't any tab order property to my knowledge.  The tab ordering should be in line with the display order.

(09-13-2012 09:03 AM)JimR Wrote:  3) I need to total some values, I have added a total field after the fields I wish to total and set it's blank value to be something like this

PHP Code:
 
$p2tot=$GLOBALS['threadfields']['p2p']*$GLOBALS['threadfields']['p2q'];
$p3tot=$GLOBALS['threadfields']['p3p']*$GLOBALS['threadfields']['p3q'];
$GLOBALS['threadfields']['total']=$p2tot+$p3tot
this I guessed when I hit save post this would post the total to the variable $GLOBALS['threadfields']['total']

but it does not seem to do it

Why does this need to be a thread field?  Why not just output it in the template?

(09-13-2012 09:03 AM)JimR Wrote:  4) Could you add a field that identifies the fid as well as the tid in the table 'threadfields_data' so I could do some queries on the database to total a value from a forum.
Just join with the threads table in your query.

My Blog
09-13-2012 07:10 PM
Find all posts by this user Quote this message in a reply
JimR Offline
Junior Member
**
Posts: 15
Joined: Jun 2012
Post: #3
RE: Can any one help with this ?
(09-13-2012 07:10 PM)ZiNgA BuRgA Wrote:  
(09-13-2012 09:03 AM)JimR Wrote:  1) how can I revert the field to show in every forum (if I have previously selected a forum for the field) without running a database query ?
(09-13-2012 07:10 PM)ZiNgA BuRgA Wrote:  Typically you can use the Ctrl key to select/unselect items.
I can not get it to have no forums selected using the ctrl key method you always tend to have one forum selected however if do not stipulate a forum when you create a field it is available to all forums and forums created after the field is created.

(09-13-2012 09:03 AM)JimR Wrote:  2) with this amount of fields it is difficult to keep track of the tab order, I have set them all to 1 in the hope that when displayed they would tab in the order that I got them to display in but in fact they display in the order I added the field ... I guess the answer is to add a tabindex tag to the html in the templates but I was hoping there may be an easier way if I add a few more fields.
(09-13-2012 07:10 PM)ZiNgA BuRgA Wrote:  There isn't any tab order property to my knowledge.  The tab ordering should be in line with the display order.
This may be correct but the problem I'm having is when a field is available to all forums displayed on the same page as a field that is available to some forums. This problem appears on Windows based browsers but not Linux based browsers (after I tested using Linux Chromium & Firefox last night). So perhaps point one and two could be some form of caching issue from the Windows OS ?

(09-13-2012 09:03 AM)JimR Wrote:  3) I need to total some values, I have added a total field after the fields I wish to total and set it's blank value to be something like this

PHP Code:
 
$p2tot=$GLOBALS['threadfields']['p2p']*$GLOBALS['threadfields']['p2q'];
$p3tot=$GLOBALS['threadfields']['p3p']*$GLOBALS['threadfields']['p3q'];
$GLOBALS['threadfields']['total']=$p2tot+$p3tot

this I guessed when I hit save post this would post the total to the variable $GLOBALS['threadfields']['total']
but it does not seem to do it

(09-13-2012 07:10 PM)ZiNgA BuRgA Wrote:  Why does this need to be a thread field?  Why not just output it in the template?
This is a good question this is linked to point 4, as the application (?) I have built only has one post per thread (which has a total) and I wish to use the thread(post) total to be added to the forum total and would save me doing all the calculations from each thread to produce the forum total
(09-13-2012 09:03 AM)JimR Wrote:  4) Could you add a field that identifies the fid as well as the tid in the table 'threadfields_data' so I could do some queries on the database to total a value from a forum.
(09-13-2012 07:10 PM)ZiNgA BuRgA Wrote:  Just join with the threads table in your query.
This was again just a way of making less queries on the database to save any impact on performance, perhaps it may be easier for me to mod the plugin  if you have no objections
09-14-2012 01:40 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Can any one help with this ?
(09-14-2012 01:40 AM)JimR Wrote:  I can not get it to have no forums selected using the ctrl key method you always tend to have one forum selected however if do not stipulate a forum when you create a field it is available to all forums and forums created after the field is created.
It works fine in Firefox, just hold down Ctrl and unselect the forum that has been selected.

(09-14-2012 01:40 AM)JimR Wrote:  This may be correct but the problem I'm having is when a field is available to all forums displayed on the same page as a field that is available to some forums. This problem appears on Windows based browsers but not Linux based browsers (after I tested using Linux Chromium & Firefox last night). So perhaps point one and two could be some form of caching issue from the Windows OS ?
OS should have no effect, and neither should the forums the field is available in either.

(09-14-2012 01:40 AM)JimR Wrote:  This is a good question this is linked to point 4, as the application (?) I have built only has one post per thread (which has a total) and I wish to use the thread(post) total to be added to the forum total and would save me doing all the calculations from each thread to produce the forum total
This "save me doing work" idea of yours is guaranteed to lead to more pain in the future.
Just do it properly: that is, perform the calculation when you need it.

(09-14-2012 01:40 AM)JimR Wrote:  This was again just a way of making less queries on the database to save any impact on performance, perhaps it may be easier for me to mod the plugin  if you have no objections
Your concept of performance seems misguided.  A join does not require any more queries.
You can modify the script as much as you want.  No one will help you if you break it though.

My Blog
09-14-2012 11:38 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: