vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Replace large images in posts with links to the images (https://vborg.vbsupport.ru/showthread.php?t=99776)

buro9 11-01-2005 08:29 AM

Quote:

Originally Posted by NuclioN
http://www.cyberty.nl/forums/showthread.php?t=8987 look at the size (should be 500 - 500 when conversion to link must work) ... it shows no alert, no reducing.

I see that the JavaScript hasn't been applied to http://www.cyberty.nl/forums/clients...tin_global.js?

If it's not in there, it certainly isn't going to convert any images to links.

You can see at the end of my JavaScript file the hack in place:
http://www.bowlie.com/forum/clientsc...tin_global.js?

Did you upload the file once you had modified it?

NuclioN 11-01-2005 08:54 AM

I see what went wrong, sorry :) I've uploaded the additional js file

buro9 11-01-2005 09:05 AM

Cool, I see it works now :)

I leave the "// HACK" bits in my JavaScript btw... this way when I upgrade I search my codebase for all instances of the word HACK and know which file changes I have to port over :)

NuclioN 11-01-2005 09:07 AM

Now there's a javascript error: id is empty or no object

buro9 11-01-2005 09:28 AM

Quote:

Originally Posted by NuclioN
Now there's a javascript error: id is empty or no object


You'd nuked the JS from your file again so I can't see whether there was an error with the installation.

However I have gone over my code again, and there was one scenario that could cause the error you described, so I've put more error checking in my code to test attributes of objects before I call them.

Download and install it again and let me know whether that fixes it. If it does not, please leave the code in place as I will very swiftly check your forums to see the error live and stand a better chance at tracing it.

Cheers

David K

NuclioN 11-01-2005 09:33 AM

Tnx for the update buro9 the error is gone now. I'm very happy with this autolink/resize :)

buro9 11-01-2005 09:40 AM

Quote:

Originally Posted by NuclioN
Tnx for the update buro9 the error is gone now. I'm very happy with this autolink/resize :)

Cool... I must've found the bug then :)

Updated the version number to reflet fixing the JavaScript

buro9 11-01-2005 03:27 PM

I'm considering an audit trail for both visibility (seeing that it is working) and security (seeing who triggered which posts to be edited).

This would be in the form of a database table that simply logs:
  • postId of post edited
  • userId of registered user that triggered the edit
  • timestamp of when the edit occured
I wouldn't provide a front-end, just the logging.

This would allow you to create your own queries to determine:
  • from the postId, you could see who posts the most large images
  • from the userId, you might detect any possible abuses where a registered user might make an AJAX app that emulates this script
  • from the timeStamp, you could create a chart showing when most edits occured. over time this should hopefully show that the problem of large images is for the most part eradicated, and then managed going forward
If there is interest from others in an audit log like this, please let me know and I'll add it :)

It would be a SQL change (new table), but beyond that nothing out of the ordinary.

Snake 11-01-2005 04:28 PM

Thanks, was looking for this!

djr 11-02-2005 12:37 AM

Haven't installed yet, but from the screenshots it seems this is not a feature: could you please add a "[This picture is auto-linked because the original picture is too large]". Even better would be to have this in a legend-div, but I can easily whip that up myself :)


All times are GMT. The time now is 07: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.01256 seconds
  • Memory Usage 1,740KB
  • 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)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