vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Remove pasted image in posts. (https://vborg.vbsupport.ru/showthread.php?t=286915)

ils 08-21-2012 07:08 PM

Remove pasted image in posts.
 
I have a forum that has a post structure like the following.

[subject]
[blah forum name blah]
[posted on date user name]

OFFENDING IMAGE (spacer.gif)

[body]
[body]
[body]
[more body]
[etc]

I'm trying to get rid of the image, as it doesn't show on browsers, but we just got Forum Runner and it shows a huge grey box in its place.

Since it was pasted in, it doesn't count as an attachment.
759 match(es) inside table post
41 match(es) inside table postparsed
759 match(es) inside table searchcore_text
179 match(es) inside table thread

My version is vbulletin4.1.10p2

I was thinking of running a SQL query from the adminCP to get rid of it, but I'm not sure which column to put in place of 'value'.
UPDATE * SET value REPLACE(value, ‘spacer.gif’, ‘’);

Am I even on the right track?

kh99 08-22-2012 01:46 AM

Well, I guess you would update the post table and chang ethe pagetext column. Also, I don't know much about Froum Runner, but usually the posts are cached so you might not see the changes right away. But you can trucate the postparsed table to clear the cache.

But couldn't you just create a spacer.gif that's not a huge grey box? Or maybe your problem is that spacer.gif is missing from where the style is looking for it?

ils 08-22-2012 02:03 PM

I'm just trying to get it out of the database. The image was copied from a forum we are about to move to, so I can avoid copying those into the new database.

I'll try running the SQL update on that particular column and post the results.

kh99 08-22-2012 02:17 PM

Quote:

Originally Posted by ils (Post 2359022)
I'm just trying to get it out of the database.

Ok, well, to be honest I'm not sure what will happen if you do that replacement. Did you look at any of the posts as they're stored in the db? I guess if they're stored as IMG bbcode tags, then they might disappear if the image name is blank. You might want to try it on one post first by finding the postid of one, then adding "WHERE postid = X" to your query.

ils 08-22-2012 02:20 PM

Thanks, I didn't think of that. We're using wysiwyg, so I didn't consider the bb code.

Lynne 08-22-2012 02:51 PM

You really need to look in the post table at the pagetext for a specific post that has this image that you wish to remove. Look to see *exactly* what is in that field so you need what you want to remove/replace.


All times are GMT. The time now is 06:34 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.01024 seconds
  • Memory Usage 1,718KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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