The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Display issue
I'm having an issue with a mod I'm creating for my site. Right now I have it saving screenshots to the database along with files. When you view the page, it lists the first file in the db twice and since it has 2 screenshots, the first duplicate shows one screenshot, then the second duplicate shows 2 screenshots.
Here is the code: PHP Code:
As you can see from the screenshot, Your Linker.zip is the entry that shows up twice when I have checked the db and it is only in the db once. |
#2
|
||||
|
||||
If you are only expecting one result, why aren't you using query_first ? Then you don't need to do your while loop.
|
#3
|
|||
|
|||
Its supposed to be all records from the database. There are screenshots in the database for each file record that need to be pulled and displayed with the file.
The screenshot only shows those 2 entries as thats where my problem is, there are a total of 3 files in the db. All 3 show though, but the first duplicates. |
#4
|
||||
|
||||
Each time you go through the loop, you are adding to $display_shots. I assume $display_shots is then used in $display_bit? The first time you go through the loop, you will have one display shot, then the second time, two display shots, then the third time, three display shots, etc. Don't use ".=", use just "=" if you don't want that to happen.
|
#5
|
|||
|
|||
Ok, I tried it, did nothing but make it 1 screenshot per duplicate. So I still have duplicates, same issue with screenshots. Do you need to view any templates or anymore php code?
|
#6
|
||||
|
||||
So what is the code you are using now?
|
#7
|
|||
|
|||
I'm using this, only changed what Lynne suggested above.
PHP Code:
|
#8
|
||||
|
||||
What is being displayed? (i.e. provide screenshot)
I'm not really understanding what is duplicating. |
#9
|
|||
|
|||
Oh guess that would help. lol
I took it down to only 2 entries. First screenshot is the duplicate entries showing. Second screenshot is the bottom of the record list showing the last entry that has no screenshot attached to it yet. |
#10
|
|||
|
|||
Lynne, Dismounted, did you both give up me already? LOL
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|