PDA

View Full Version : Module CMPS: Add vBGallery Image comments


Zachariah
04-18-2006, 10:00 PM
/* -----------------4/19/2006 12:41PM -----------------

Add Gallery Image comments to CMPS Block

Tested on:

vBulletin 3.5.4
PhotoPost vBGallery v1.0.2
vBadvanced CMPS v2.0.1


DEMO (http://www.gzhq.net/index.php?page=Hacks) - ? Recent Gallery Comments


Number of comments to display in a block
Size of thumbnails
Comment Text Cutoff
BBCodes
Smilles




1 query added to CMPS page



--------------------------------------------------*/

Zachariah
04-19-2006, 06:51 PM
This hack will pull comments from any and all catagories.

To Do's
- Add specific catagory support
- Add exclude catagory support

Ramsesx
04-19-2006, 07:35 PM
Very cool, thank you.
Only the images are not showing.
The image source is http://www.mysite.de/gallery/files/1/3/9/1/1391-myfile.jpg but should be gallery/files/1391-myfile.jpg

Zachariah
04-19-2006, 09:58 PM
Ya your running in PHP safemode.

Ill take a look.

Zachariah
04-19-2006, 10:48 PM
1st post updated
- Replace vbg_comments.php

Ramsesx
04-19-2006, 10:49 PM
Thanks, but I changed:
$src = $vba_options['gallery_fileurl'] . '/' . implode('/', preg_split('//', $image['userid'], -1, PREG_SPLIT_NO_EMPTY)) . '/' . $filename;
to

$src = $vba_options['gallery_fileurl'] . '/' . $filename;
This seems to work fine.
Now there's only one more thing, the module header isn't displayed right, please have a look on the screenshot.
Thanks

Zachariah
04-19-2006, 10:54 PM
Ya before you posted I uploaded a new php file that will detect is in safemode or not.
- Same code w/ <if> statment

Edit Module in CMPS. (updated readme.txt)
- Title Row Colspan: 2

Ramsesx
04-19-2006, 11:31 PM
Yeah, now it's perfect and I learned for what the Title Row Colspan is for :)
Thanks again Zachariah and nice to see that you make so many improvements for the gallery.

klaush
04-20-2006, 02:34 PM
I love it! :-)

Thanks!

Zachariah
04-20-2006, 06:28 PM
@Ramsesx
Ya I forgot to include that in the readme.txt ;)

@klaush
Hey dude your site is looken good :cool:

klaush
04-20-2006, 06:42 PM
@klaush
Hey dude your site is looken good :cool:

You know, that your pp vBGallery hacks are the main and important hacks on our site? Yes, you know that! :-)

Zachariah
05-12-2006, 05:17 PM
Added:
- functions_gallery_store.php

This method works for PHP4x , 5x. I have tested this and it works.

This will "globalize" the needed $phrasegroup and $specialtemplates with 1 file edit so no other file edits are needed on hacks that need the gallery's:

- $phrasegroups
- $specialtemplates

--------------------------------

* This will add all the needed file edits for gallery add-ons.
* This will work on ALL VB powered pages
* This will work on vBAdvanced CMPS pages
* This will work on vPortal pages and Blocks
* This only needs to be done once

- I will update any hack I create with this method. The file will be with every hack until a standard can be added to the main build.

http://www.photopost.com/forum/showthread.php?t=123315

thegodfather2
12-15-2006, 01:42 AM
just wondering if this can be used to rate pictures... like hot or not, or if you know of something that can be installed to be used with vb3.6, that will have same functions...

i tryed i-rater, but... really need to know what your doing to try and incorporate with vb. over my head

klaush
01-03-2007, 02:53 PM
Hi Zach; we need to exclude one or two categories.

Possible?

Thanks!

Zachariah
01-03-2007, 08:08 PM
Hi Zach; we need to exclude one or two categories.

Possible?

Thanks!

Edit the file:
- forums/modules/vbg_comments.php

Add Bold:
$getposts = $db->query("
SELECT posts.title, posts.userid, posts.username, posts.dateline, posts.pagetext, posts.imageid, posts.visible, posts.allowsmilie, posts.iconid, posts.showsignature, posts.ipaddress, images.userid as imageuserid, images.filename,images.extension, images.height, images.width, images.thumbname
FROM " . TABLE_PREFIX . "adv_gallery_posts as posts
LEFT JOIN " . TABLE_PREFIX . "adv_gallery_images AS images ON (images.imageid = posts.imageid)
WHERE images.catid NOT IN (6,7,8,9)
ORDER BY dateline DESC
LIMIT " . $vba_options[comments_block_count]
);

In the EX: I used ID's: 6,7,8,9

klaush
01-04-2007, 08:29 AM
Thanks, Zach. This was the half step!:-)

It excludes the picture but not the comment.

Any idea?

klaush
01-08-2007, 08:01 PM
Zach? Any idea?

Zachariah
01-23-2007, 01:05 AM
Zach? Any idea?

Post 15 updated

klaush
01-23-2007, 03:34 AM
Post 15 updated

Thanks, Zach, that did the trick!

puregraf
01-28-2007, 11:26 AM
hi, i went to install and i got this error after i added the line :

require_once(CWD . '/includes/functions_gallery_store.php');

to the required place on init.php under :
require_once(CWD . '/includes/class_core.php');


error:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Active Graffiti Picture Gallery. Only the BEST Artists Accepted, 100% Quality. Database Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
<!--
blockquote { margin-top: 75px; }
p { font: 11px tahoma, verdana, arial, sans-serif; }
-->
</style>
</head>
<body>
<blockquote>
<blockquote>
<p><strong>There seems to have been a problem with the Active Graffiti Picture Gallery. Only the BEST Artists Accepted, 100% Quality. database.</strong><br />
Please try again by clicking the <a href="#" onclick="window.location = window.location;">Refresh</a> button in your web browser.</p>
<p>An E-Mail has been dispatched to our <a href="<A href="mailtog@puregraffiti.com">Technical">mailt og@puregraffiti.com">Technical Staff</a>, whom you can also contact if the problem persists.</p>
<p>We apologise for any inconvenience.</p>

<!--
Database error in vBulletin 3.5.4:
Invalid SQL:
SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
language.phrasegroup_holiday AS phrasegroup_holiday,
language.phrasegroup_adv_gallery AS phrasegroup_adv_gallery,
language.phrasegroup_global AS phrasegroup_global,
language.options AS lang_options,
language.languagecode AS lang_code,
language.charset AS lang_charset,
language.locale AS lang_locale,
language.imagesoverride AS lang_imagesoverride,
language.dateoverride AS lang_dateoverride,
language.timeoverride AS lang_timeoverride,
language.registereddateoverride AS lang_registereddateoverride,
language.calformat1override AS lang_calformat1override,
language.calformat2override AS lang_calformat2override,
language.logdateoverride AS lang_logdateoverride,
language.decimalsep AS lang_decimalsep,
language.thousandsep AS lang_thousandsep

FROM user AS user
LEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)
LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) INNER JOIN language AS language ON (language.languageid = IF(user.languageid = 0, 1, user.languageid))

WHERE user.userid = 1;
MySQL Error : Unknown column 'language.phrasegroup_adv_gallery' in 'field list'
Error Number : 1054
Date : Sunday, January 28th 2007 @ 05:21:49 AM
Script : http://www.puregraffiti.com/graffiti-space/index.php
Referrer : http://www.puregraffiti.com/graffiti...ex.php?do=head
IP Address : 201.9.197.133
Username :
Classname : vb_database
-->

</blockquote>
</blockquote>
</body>
</html>


i removed the line, and the error disapeared. the files are currently both uploaded the the correct locations and I await instructions on why im receiving this database error.


thanks

puregraf
01-28-2007, 11:52 AM
p.s. after i created the module, i got this error: Warning: main(./includes/functions_gallery.php): failed to open stream: No such file or directory in /modules/vbg_comments.php on line 32

Fatal error: main(): Failed opening required './includes/functions_gallery.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/puregraf/public_html/graffiti-space/modules/vbg_comments.php on line 32

Zachariah
01-29-2007, 06:59 AM
p.s. after i created the module, i got this error: Warning: main(./includes/functions_gallery.php): failed to open stream: No such file or directory in /modules/vbg_comments.php on line 32

Fatal error: main(): Failed opening required './includes/functions_gallery.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/puregraf/public_html/graffiti-space/modules/vbg_comments.php on line 32

This is for vBGallery not Pro. It will not work for you. I think I seen this type of hack for Pro @ photopost.com in the mods area. If not it should not be hard to make.

puregraf
02-02-2007, 12:52 PM
ohhhh ok , darn

vnairp11
11-24-2007, 04:28 AM
this hack is great but one glitch the babcodes like <B> bold Italic shows up on the comments as writing :( instead of actually showing teh bold text