PDA

View Full Version : Add-On Releases - vBadvanced & Photopost Latest comments on front page.


phill2003
11-26-2006, 10:00 PM
**********************UPDATE 12/03/2006**************************
If you have downloaded the file before this update then i recomend that you re-download it and use the latest file.


In this latest edit I have made the file check the photo height and width and show the correct size thumbnail (thanks to Cocko for bringing this to my attention :))

I believe this is the last edit that will be needed as i have done everything I can think of for this and it does what it is supposed to now, That is it shows the latest 5 comments and only those comments that have an actual comment in it and not just a rating with a blank comment.

It displays the username of the user who posted the comment and links to his/her profile (vb profile) it puts the rating under the photo (with instructions on how to remove it) and now it checks the width and height and sizes the thumbnail accordingly.

Thanks

phill






*****************END UPDATE**************************************
**********************UPDATE 12/02/2006**************************

If you have installed this already re-download the hack and use the updated cmps_comms.php it has more built in functionality.


Main edits.

1. ability to disallow cats from showing.

2. Stops empty comments from showing and grabs the latest 5 comments that have comments in them.

3. I put the ratings onto it so they show under the thumbnails (I included instructions on how to remove it)


So please re-download the zip file and use that one it is the latest build of this hack.

Thanks

Phill
*****************END UPDATE**************************************

This hack will put the 5 latest comments from photopost pro into a block on the front page of your vbadvanced cmps.

Demo Here (http://www.thatsshocking.com)

or see screenshot attached.


To install this.

1. Open cmps_comms.php and edit all the variables to your own.

once done save.

2. open cpms_coms_block.php and change the path to the script to reflect yours.

once done save.

3. Upload cmps_comms.php to your photopost folder

4. upload cpms_coms_block.php to your module folder (cmps modules)

5. go to your vbulletin admin control panel.

6. in the left pane choose vBa CMPS and expand it, then choose 'add module'

7. choose php file

module title 'whatever you want to call it'

column 'which ever one you want it in'

active 'yes'

update all pages 'yes'

file to include 'cpms_coms_block.php'

identifier 'comms block'

clean file output 'yes'

use shell template 'yes'

and save......


you should now have the block on your front page.

If it looks funny or is not is the block or something, go back untick clean file output and save then go back and retick clean file output and save, that should clear up the problem (no idea why it does that but it does)

Hope you like this hack

please click install if you use this

This was brought to you by http://www.ThatsShocking.com

phill2003
11-27-2006, 08:38 AM
This should work on any vBulletin version.

SherryG
11-27-2006, 11:26 AM
Not working for me, mate. I have nothing appearing at all. I even tried tried your trick with "clean output file" and I still have nothing.

Using vBulletin 3.6.4, CMPS 2.2.0, Photopost PHP Pro

phill2003
11-27-2006, 12:20 PM
Have you redone all the variables so it can connect to your photopost database?

Have you enabled the block in edit pages if you have not set all pages to be updated?

Hmm bit odd really as all it does is include it and then put the output into a shell template block.

If you want me to pop over and have a look i can do :)

StuntFactoryX
11-27-2006, 04:37 PM
http://www.stuntfactoryx.com/index.php?page=test

awesome.. i was looking for this. im having issues getting the shell to work correctly.. i tried moving colums.. reticking clean file output several times. im close. :)

sensimilla
11-27-2006, 05:36 PM
Any chance to same hack for forumhome template ?
Im not using vbadvanced. TIA

phill2003
11-27-2006, 06:25 PM
Any chance to same hack for forumhome template ?
Im not using vbadvanced. TIA


You can use the hack on the forum home, Just use the includes from the module file and do it as a plugin at global_start then you can make a table and put the variable $cmpscomms into it.


I will make one for you tomorrow if you want.

http://www.stuntfactoryx.com/index.php?page=test

awesome.. i was looking for this. im having issues getting the shell to work correctly.. i tried moving colums.. reticking clean file output several times. im close. :)

Looks great to me, have you tried making the thumbs a little bigger for your blocksize :)

StuntFactoryX
11-27-2006, 06:47 PM
are you using firefox? it works perfect there. IE6 the header dosent expand all the way across. it stops where thumbs start.

phill2003
11-27-2006, 06:58 PM
Oh yea i had to change colspan="$mods[colspan]" to colspan="2" in the adv_portal_module_shell template to get it to work in IE no idea why though.


(you may need to change it to 5 though)

KW802
11-27-2006, 07:06 PM
Oh yea i had to change colspan="$mods[colspan]" to colspan="2" in the adv_portal_module_shell template to get it to work in IE no idea why though.


(you may need to change it to 5 though)Don't change the adv_portal_module_shell template! That will affect all of your CMPS modules. Instead edit the properties of your new module and change the "Title Row Colspan" value from "0" to "2" (or whatever value you need).

KW802
11-27-2006, 07:25 PM
Does this work with vba gallery 2.1? There were some fairly significant database changes from 2.0.1 to 2.1.This hack deals with PhotoPost PHP Pro, not PhotoPost vBGallery.

StuntFactoryX
11-27-2006, 07:26 PM
im confussed.. i dont see anything in module about colspan but i dont want to mess up my other modules either.

KW802
11-27-2006, 07:32 PM
im confussed.. i dont see anything in module about colspan but i dont want to mess up my other modules either.What version of CMPS are you running?

You should be able to find the colspan option at...

ACP => vBa CMPS => Edit Modules => {The name of the new module you created} => Module Shell Template Options => Title Row Colspan

foulplay
11-27-2006, 07:38 PM
not working for me either......

StuntFactoryX
11-27-2006, 07:40 PM
working perfect.. i was looking for colspan in the module php file that came in zip.

thanks for your help. and thanks kw for the hack.

KW802
11-27-2006, 07:42 PM
working perfect.. i was looking for colspan in the module php file that came in zip. There is a lot of stuff buried in CMPS; takes a while to get used to it all. :)

thanks for your help. and thanks kw for the hack.Hack is from phill2003. I'm just a CMPS junkie. ;)

StuntFactoryX
11-27-2006, 09:11 PM
opps thats what i meant.. had you switched up.. i did notice that the font is larger in the the other font used in cmps. what do u suppose will happen if the comment contains very large font?

Cocko
11-29-2006, 05:35 PM
hack is running vb 3.6.4, vba 2.2.1, pp pro 5.5
a very nice idea to improve cmps + gallery, thanks!

a few notes / questions about:

image thumps are unproportional to originals
where or how to fix this issue ?

is it possible to show the comment values ?
this is as well important if the comment field
is blank (just no comment but a value)

phill2003
11-30-2006, 04:16 AM
hack is running vb 3.6.4, vba 2.2.1, pp pro 5.5
a very nice idea to improve cmps + gallery, thanks!

a few notes / questions about:

image thumps are unproportional to originals
where or how to fix this issue ?

is it possible to show the comment values ?
this is as well important if the comment field
is blank (just no comment but a value)

You can set the image size inside cmps_comms.php on line 39 just set it to whatever you want.

I dont understand what you mean about the comment values? I am currently trying to get it to not show blank comments, I am a beginner at this though so its taking a while :).

Cocko
11-30-2006, 05:40 PM
You can set the image size inside cmps_comms.php on line 39 just set it to whatever you want.

the settings may compress the image size instead of rebuild image size.
hope its clearer now ;)


I dont understand what you mean about the comment values? I am currently trying to get it to not show blank comments, I am a beginner at this though so its taking a while :).

sorry about my english.
of course it would be nice if you can fix the blank comments also -
thats what i asked for - it would be nice to show the rating over all.

thanx for working on this very useful hack.

phill2003
12-02-2006, 05:59 PM
I have done the ratings and stopping the blank comments from appearing :)

I think i know what you mean with the photos i will have to see what i can do.

phill2003
12-03-2006, 09:05 PM
the settings may compress the image size instead of rebuild image size.
hope its clearer now ;)



I think i have sorted out this problem now :) if its what i think it is lol.

Cocko
12-03-2006, 09:41 PM
I think i have sorted out this problem now :) if its what i think it is lol.

sounds good.
tested.
but the box disappeared.

will try again..

optrex
12-04-2006, 04:38 AM
I get the following error - any help?

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND comment != '' ORDER BY date desc LIMIT 5' at line 2

phill2003
12-04-2006, 07:20 AM
Is it just a standard file have you changed anything apart from the variables you need to change?

optrex
12-04-2006, 03:36 PM
no, nothing other than the variables.

phill2003
12-04-2006, 05:15 PM
Ok try changing the ' for " see if that makes a difference.

optrex
12-04-2006, 10:29 PM
still no joy, this is the php that I think it refers to

// You may need to change the db_table_prefix if you altered it from default pp_ to something else or removed it
$result = mysql_query("SELECT username,cat,comment,photo,userid,rating
FROM pp_comments WHERE cat NOT IN ($cat_exclusions) AND comment != ''
ORDER BY date desc
LIMIT 5" ) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {

phill2003
12-05-2006, 01:39 PM
Try reuploading the file see if it got corrupted because to be honest unless its something to do with php5 i cant see anything wrong with it. (but i am not an expert by any means)

Another thought, have you set any cats to be disallowed? if not it may be worth getting rid of cat NOT IN ($cat_exclusions) AND

jgommel
12-05-2006, 08:54 PM
I too am getting the following error after following the directions...

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND comment != '' ORDER BY date desc LIMIT 5' at line 2

I'm going to go over the two .php files again and make sure I didn't miss anything, but I'm about 99% sure I have not.

jgommel
12-05-2006, 09:20 PM
Okay - I figured out that it has to do with the exclusions portion of the code. $cat_exclusions = '522,530'; Basically you have to exclude a category in order for this to work. You just can't COMMENT the code or remove it. As soon as I excluded a few categories (which I decided that I needed to anyhow) it worked just fine.

My next problem pertains to the header bar which appears to only extend as far as the first column. See attached photo: neosmut001 I thought I read something regarding this issue, so I'll scan a few posts back and see.


**** UPDATE *****
This fixed the short header bar....

Product: vBadvanced CMPS Templates
Template: adv_portal_module_shell

Find:
<td class="tcat" colspan="$mods[colspan]">

Replace with:
<td class="tcat" colspan="6">
Note: Becuase I'm using the module in the center, I used '6' for the colspan to match the total columns of another center module that has 6 columns.

optrex
12-06-2006, 03:21 PM
I've tried excluding - no joy.
I am on php 4.4.4 so is there a problem with the conversion from php 5 ?

Cocko
12-08-2006, 06:03 PM
which way showing smilies in comments at cmps ?

optrex
12-09-2006, 09:45 AM
I wold love to get this working if anyone has ideas on how to fix this php error

b6gm6n
12-09-2006, 11:03 AM
got it all working, quite nice... but seeing as im using custom thumbnail borders it make the whole thing look out of sync with my site, also it was extremely wide when place on a sidebar, would be nice to set the amount of comments to a high amount BUT have it scroll so you don't get a long sidebar... anyways something to think about :)

-b6

StuntFactoryX
12-10-2006, 04:41 PM
i added this... im not sure if its correct code but its works in IE and firefox... i think it looks a little more in sync w/ my styes. so far so good

in cmps_comm.php towards the bottom and found this line

<span class="{$Style['small']}">$row[comment]<br>by <a

and changed it to

<span class="smallfont">$row[comment]<br>by <a

the old way looked good in default skin but the font was too big in some others

another thing i did was found this line

width="45" height="32" border="0"></a></td>

your numbers could be different and i removed the height so it dont strech the thumbs

width="45" border="0"></a></td>

www.stuntfactoryx.com bottom right

SherryG
12-27-2006, 10:47 PM
Tried this module but getting the following error message:

Unknown column 'xxx' in 'where clause'

Can someone tell me what the problem might be?

Cheers!

phill2003
12-28-2006, 04:20 AM
yes, you have not edited the file properly, column xxx is supposed to be the id of the photo catagory you do not want showing, Look at the instructions again and do them as they should be done and the error will go away.

puregraf
01-04-2007, 08:18 PM
How would i add the recent comments to my right_column hack i have installed, whats the code i would need to add so that it would display the recemnt comments on my vbulletin forum page on the right column side, where my hack is currently enabled and i have google ads on that area?

heres the vbulletin forum so you can see what im talking about the right column side

http://www.puregraffiti.com/graffiti-space/index.php

Exitilus
01-04-2007, 08:43 PM
This module is for Vbadvanced not vbulletin itself.

phill2003
01-05-2007, 04:18 AM
How would i add the recent comments to my right_column hack i have installed, whats the code i would need to add so that it would display the recemnt comments on my vbulletin forum page on the right column side, where my hack is currently enabled and i have google ads on that area?

heres the vbulletin forum so you can see what im talking about the right column side

http://www.puregraffiti.com/graffiti-space/index.php

take the include statement (minus the echo part) from the module file and put it into global_start as a plugin. then you can put the variable into your right column code

SherryG
01-07-2007, 01:58 PM
Got this working and it's great! Thank You!

I have just one question - how would I get the lines to appear between each comment/photo like you have in your sample thumbnail?

Cheers!

Exitilus
01-09-2007, 11:34 PM
Any chance of seeing support for BB Code added?

Cocko
01-10-2007, 04:11 PM
and smiles would be nice, also

SherryG
01-14-2007, 01:33 PM
Got this working and it's great! Thank You!

I have just one question - how would I get the lines to appear between each comment/photo like you have in your sample thumbnail?

Cheers!

yotsume
08-31-2007, 05:20 PM
Hi,

Nice start of a hack... It's off to a good start... that fact that you have to exclude categories for this to work is a super glitch in my book because I don't want any of my categories excluded!!!

So what I did to fix this is put a fake category number in and poof it works perfect! So if you have the problem with this error:

Unknown column 'xxx' in 'where clause'

Just put in: $cat_exclusions = '1,2' (line 11 in my file)

Then the module will work without that error and all categories will show comments.

This module looks pure ugly in my side columns in my CMPS. I have to have it in my center. I am working out how to set this up in a column that will not look pure ugly. I will post screen shots and how to do with clear instructions once I get it worked out.

phill2003
08-31-2007, 07:38 PM
Hi,

Nice start of a hack... It's off to a good start... that fact that you have to exclude categories for this to work is a super glitch in my book because I don't want any of my categories excluded!!!

So what I did to fix this is put a fake category number in and poof it works perfect! So if you have the problem with this error:

Unknown column 'xxx' in 'where clause'

Just put in: $cat_exclusions = '1,2' (line 11 in my file)

Then the module will work without that error and all categories will show comments.

This module looks pure ugly in my side columns in my CMPS. I have to have it in my center. I am working out how to set this up in a column that will not look pure ugly. I will post screen shots and how to do with clear instructions once I get it worked out.


Yep or it could be that I wanted to exclude cats from showing :) If you dont want to exclude anything just remove

$cat_exclusions = 'xxx,xxx'; from about line 10 and change

WHERE cat NOT IN ($cat_exclusions) AND comment != '' to WHERE comment != ''


But if you want to put false cat numbers in to fix a non existent problem go right ahead :)


Oh and as it looks pure ugly you probably wont want to use it so if thats the case you may want to release one you code so others can come and say to you

"Hey this is crap looks rubbish is not finished but i will use it anyway"

yotsume
09-16-2007, 06:43 PM
In my sidebar this module kills my theme.

In my center column it looks awesome... but.... Someone left a good sized comment with a long URL. It is stretching my theme to the right so the right column you now have to scroll to see all of it.

What code do I have to change to make this module when in the center column not stretch.

How can I set the width of this in a center column so it perfectly matched my other blocks?

I am sorry if my comments about your module didn't sit right with you... but... like I said in a side column it is all whacked out for me and doesn't look as nice as your great screen shot.

There are other problems with your module as well. URLs don't show correctly nor does BB codes. For instance, instead of a nice hyper link in a comment it shows:

["URL]http://www.domain.com/whatever/08-02.html[/URL"] (without the "")

So How do I stop the block from stretching when long urls are posted?

Thanks!

Again don't take my comments personally and fire back at me but it has problems and I am willing to help the best I can by at least letting you know so you can make an even better module.

Thanks for a great module its a one of a kind so far!