Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
prekill
Worker
Worker



Joined: Oct 22, 2005
Posts: 201

PostPosted: Sun Dec 26, 2010 2:20 am Reply with quote

Hey,

How hard would it be to collect all IMG tags a user has posted and display them in one page as gallery?

What do you think about this idea? Rolling Eyes
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Dec 26, 2010 10:15 am Reply with quote

Do a little analysis. You would have to define which tables are of interest. Stories, content, forums postings, reviews, whatever ... ? Then which fields within them are relevant: for instance the hometext field in _stories. Then you'd need to write a parser that would read those fields and accumulate img tags on a per user basis and probably store them off in a new table that you would have defined. I suspect there might be some gotchas in that, getting paths right and the like. Then you'd need "gallery" software to process that new table. And you'd have to write that yourself.

Probably, to develop the parser you'd have to sit with phpmyadmin and study the internals of how the fields are set up to store the image tags and deal with all kinds of exceptions.

Ultimately, I suppose it could be a cool module or capability to have but it would get pretty intricate first.
 
View user's profile Send private message Visit poster's website
prekill







PostPosted: Mon Dec 27, 2010 5:10 am Reply with quote

Umm i thought about something simpler..

im talking about only the forums module.

the IMG tag is always using absolute path to the image, never relative.

Will it be hard to write something that will scan the forum posts for IMG tags per user and just display them in a page, change the width and height to display thumb image and click on the image will open it in a new window.

?

Thanks
 
fkelly







PostPosted: Mon Dec 27, 2010 8:54 am Reply with quote

Looks like you will have to tie together (relate) the bbposts and bbposts_text tables. The links to the imgs seem to be stored in the text table but the userids are in the bbposts table. And the sample img tags that I can see on my system after a brief investigation do appear to be a path to the image as you say and they don't have any size information. They also appear to be bbcode (i.e., img with square brackets around it). I don't know the internals of how the bulletin board software translates that into "normal" html but you'll need to do something similar as well as adding height and width attributes.

And you'll still need to write a parser of sorts to go through the bbposts table, post_text field character by character and extract images and store them by user in your own new table. Not a completely trivial exercise.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©