vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   userid for posts/attachments (https://vborg.vbsupport.ru/showthread.php?t=221522)

mangus580 08-23-2009 02:15 AM

userid for posts/attachments
 
Ok, I am trying to take a watermark modification that creates a watermark on the hook of attachment_display. The mod works fine the way it is, but I would like to add the posting username to the watermark on the fly. On our previous forum, I was able to write the code so it did it upon upload. Due to technical (security) reasons it messes up the image doing it this way... so I figured doing it upon view will work.

Here is my issue. I need the way to pull the userid variable for the post... so that I can create the watermark for that user. I have tried everything I can think of, and nothing yet has worked.

What would the variable be for this???

Lynne 08-23-2009 03:36 AM

The name of the variable depends on what hook location you are using (which you didn't state). You should find the hook in the php pages and look at the variable names called around it.

mangus580 08-23-2009 03:00 PM

I did state the hook name: attachement_display

Lynne 08-23-2009 03:32 PM

Ah, it sounded like you were modifying it and moving it to another hook location.

If you find the hook in the code (make sure you spell it correctly :) ), you'll see that they make reference to $attachmentinfo['userid']. Is that the userid you were looking for?

mangus580 08-23-2009 05:37 PM

I believe so... I will try it :-)

--------------- Added [DATE]1251052965[/DATE] at [TIME]1251052965[/TIME] ---------------

AWESOME!! That did the trick...

THANK YOU VERY MUCH!

--------------- Added [DATE]1251062725[/DATE] at [TIME]1251062725[/TIME] ---------------

Couple more questions...

What file did you find this info in? (not sure where to find hooks in the code :-) )

Also, would the username be $attachmentinfo['username'] ??

--------------- Added [DATE]1251069745[/DATE] at [TIME]1251069745[/TIME] ---------------

Also... maybe the date the post was created (or attachment was created)

--------------- Added [DATE]1251085631[/DATE] at [TIME]1251085631[/TIME] ---------------

Ok.... I found there is no username listed (also found the date....)

I will start a new thread on a quick way to obtain the username from userid.


All times are GMT. The time now is 05:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01178 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete