The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#31
|
|||
|
|||
kk just to let you know I change it with the new code you gave us and I still got the same error.
|
#32
|
|||
|
|||
don't want to hijack this thread or anything, but just wanted to ask if i only want to look for the usergroup(s) the threadstarter belongs to, do I also need to work with all that code?
I want to show an image in the threadbit, next to the username of the threadstarter if the threadstarter belongs to usergroup 22 ... that usergroup is an "additional" usergroup. |
#33
|
||||
|
||||
Quote:
Quote:
Hmmm... There is no doubt that it is my code that is causing your error. Line 866 in forumdisplay is where the forumdisplay_query hook is located, and that's where I told you to make that first plugin. I just can't seem to figure out WHY. This field17 of yours, it's just a string, correct? Like a link to an image or something, not the actual image data, right? I'm not understanding why it's trying to allocate such a huge chunk of memory. I mean, if it was actual binary data (like if you stored the image itself on the database) I guess I could understand... Could you do me a favour and select five or ten random users, get their userid, run this query (phpMyAdmin, the vBulletin run query bit, or even by the command line, it matters not where), and paste the output for me? Code:
SELECT field17 AS maritalstatus FROM userfield WHERE userid IN (XXX1,XXX2,XXX3,...,XXXN) --------------- Added [DATE]1246376862[/DATE] at [TIME]1246376862[/TIME] --------------- Quote:
You will be making a plugin on the hook forumdisplay_query. Title it however you want. Now, what you want is to join the user table with the thread table, so that you can select values from the user table. The specific field you want is membergroupids. PLEASE NOTE, however, that if for some reason you change around the users' PRIMARY usergroup (something I never do), that this will be an entirely different story! I'm just assuming here that you use secondary usergroups, so let me know if that's not the case! ALSO NOTE, this first code is assuming that you want to use more than the usergroup '22' at some point in the future. We can uncomplicate things (heh, kind of) if you KNOW that you will only ever want to use usergroup 22, and I'll explain that a bit later. So, here's the code that needs to go in the plugin, assuming the above: PHP Code:
Our NEXT plugin goes on the hook, threadbit_display. Title it what you want. :3 The code we'll use will make that list into an array, and will then search the array for the value '22'. PHP Code:
Consider this alternative to the above plugin: PHP Code:
I'll be back in a bit with explanation for if you ONLY ever wanted to use usergroup 22. --------------- Added [DATE]1246382814[/DATE] at [TIME]1246382814[/TIME] --------------- Y'know, I really hate this effing "Auto-merged Double-Post" crap. A lot of posts can be read better if their content was seperated better. [high]* DragonBlade shakes a fist in defiance of the Admins. And is then struck down with the Almighty Ban Hammer. [/high] ANYWAYS, back to what I was saying. I went over it, and really, the efficiency wouldn't be much better in searching only for usergroup22 in the query, so what I posted is probably best. HOWEVER, there might be a slight bug with the second plugin. The line, PHP Code:
PHP Code:
|
#34
|
|||
|
|||
DragonBlade, you are awesome ! :up::up:
Worked exactly as you described and it's just what I needed, I'm so happy now Now I also (somewhat) understand that whole hooks thing, that's actually pretty nice. Once again, thank you very very much |
#35
|
|||
|
|||
Well I used the gender icon in post bit code thing for the marital status...
PHP Code:
|
#36
|
|||
|
|||
DragonBlade, can you help me with this? Please
|
#37
|
|||
|
|||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|