vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Social Group and Album Enhancements - Watermark Generator (https://vborg.vbsupport.ru/showthread.php?t=263804)

BadgerDog 05-24-2011 01:47 PM

Quote:

Originally Posted by Disasterpiece (Post 2199452)
Looks good to me.

I updated the test script yesterday so it should be more verbose now. Download it from her: https://vborg.vbsupport.ru/showpost....1&postcount=36
Put it into your root dir and navigate to the script, adding ?i1=*number* to the url where *number* is the id from an image where the watermark should appear.

Ok, done and ran ..... :)

http://www.xxxxxx.com/devforum/testa...s.php?i1=22804

Output ...

Watermark system finished
Script end.


When I run preview or look at attachments, no watermark shows. In preview, I still don't see demo pic.

Regards,
Doug

Disasterpiece 05-24-2011 01:52 PM

In your cache directory, do files appear?
If you download one of those, rename the extension to .jpg (or the according image format) and view them in the windows image viewer, do you see watermarks?

If not, PM me your login credentials and I take a look myself. Very strange.

BadgerDog 05-24-2011 02:06 PM

Quote:

Originally Posted by Disasterpiece (Post 2199459)
In your cache directory, do files appear?
If you download one of those, rename the extension to .jpg (or the according image format) and view them in the windows image viewer, do you see watermarks?

If not, PM me your login credentials and I take a look myself. Very strange.

Nothing in cache...

Downloaded attachment pic and nothing showing anywhere on it...

Regards,
Doug

Update: I just went back to the devforum and checked it again. I have no idea why, but all of a sudden watermarks are displaying on both attachments and in-line attachments. :eek: The "preview" pic still doesn't show, but it's at least working live now, so I guess we can start some real testing. :)

demo7up 05-25-2011 01:16 PM

i dont use id's in my url's

this is the error

Invalid SQL:

SELECT a.contenttypeid
FROM attachment AS a
WHERE a.attachmentid = 2006-I-drive-a-eg-4-door;

MySQL Error : Unknown column 'I' in 'where clause'
Error Number : 1054
Request Date : Wednesday, May 25th 2011 @ 08:14:14 AM
Error Date : Wednesday, May 25th 2011 @ 08:14:14 AM
Script : http://nycjdm.com/testattachments.ph...ve-a-eg-4-door
Referrer :
IP Address : 24.136.115.58
Username : XXX
Classname : XXX
MySQL Version : 5.0.92-community

Disasterpiece 05-25-2011 01:21 PM

Which SEO Addons do you use?
Also: Which vB version do you have?

demo7up 05-25-2011 01:36 PM

i have 4.1.3

Im using VB's Friendly URL's built in feature i have mine set to

Basic Friendly URL's

Disasterpiece 05-25-2011 05:46 PM

Interesting, I'll figure it out!

BadgerDog 05-25-2011 08:54 PM

Some questions and thoughts ... :)

It's obvious that using the cache approach, this mod would cause a duplication of attachments, which isn't a problem for people with large hard disk space available.

However, what I was wondering was, is there an impact on performance that would slow down the forums with the mod having to intercept every attachment being viewed by the user, then save it to the cache, then retrieve it again?

Thanks for any feedback ..

Regards,
Doug

Disasterpiece 05-25-2011 09:12 PM

It's waaaay cheaper reading a cache file from disk than regenerating the image for every viewer.
Re-generating means:
- load attachment from file or database
- check if large enough, etc.
- load watermark file
- apply watermark file
- output

Loading from cache means:
- load cached image file
- output

Hard-disk drives use an internal page cache as well, so it's the best way to gain optimal performance.

For those with limited disk space, I implemented the cache table, which only keeps a fraction of the attachments which have been viewed recently in the cache. This should allow optimal control between performance and disk usage. Of course the worst case then would be, if an user views all attachment images one after another. But then again, it's a server and they're optimized to handle this kind of stuff.

If you have more questions or suggestions about performance and cache behaviour, feel free to ask :)

BadgerDog 05-25-2011 09:38 PM

Quote:

Originally Posted by Disasterpiece (Post 2199970)
If you have more questions or suggestions about performance and cache behaviour, feel free to ask :)

Thanks for the detailed answer .. appreciate it ....that was very helpful ... :up:

I think I might try to move this to the live forums, but I'm a little worried that table didn't get created and added to the database during the install. Should I wait until you've finished your beta testing?

Regards,
Doug


All times are GMT. The time now is 09:30 PM.

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.01053 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete