Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Blog Comments vBAdvanced CMPS Details »»
Blog Comments vBAdvanced CMPS
Version: 1.00, by optrex optrex is offline
Developer Last Online: Mar 2011 Show Printable Version Email this Page

Category: vBulletin Blog - Version: 3.7.5 Rating:
Released: 03-17-2008 Last Update: 03-17-2008 Installs: 37
Additional Files Is in Beta Stage  
No support by the author.

One of the main problems with the vB blog module is its poor integration with the main forum. This module allows you to show the last 5 blog comments in a module on your vba portal page.

Features
Comments will not display if they have not been approved.

Instructions
Click install and download the attached zip file
Edit comments.php and change the variables to allow connection to your database.
Edit cmps_comments_block.php and change the path.
Upload comments.php to your forum directory.
Upload cmps_comments_block.php to your modules directory.

From your admincp - vba cmps
Add new module
PHP file
Title - call it what you want
Active - yes
File to include - cmps_comments_block.php
Identifier - call it what you want
Link - choose either blog home or comments page as you wish
Save and add to the page of your choice, the module has been designed to be a left or right block.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 09-16-2008, 04:13 AM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Finally Got This Working!
Finally got this working with the help of member "rainyleaves". Here are better instructions and a code fix which is missing from the author's zip file comments.php file. The missing code is for selecting your database table prefix which is missing.

IMPORTANT NOTE: IMG Tags Can Stretch Sideblock
IMG tags with longer urls will break this if you set this as a side block. Your cmps page will get stretched breaking your layout! NOTE: More coding is needed to correct this issue. Suggestion: (temp fix) You may want to use this mod as a center block instead.

INSTRUCTIONS:
  1. Edit the cmps_comments_block.php file.
  2. The path in this file must be entered in full url format like this:
  3. Quote:
    include('/homepages/xx/xxxxxxxx/htdocs/foldername/comments.php');
  4. If you use a normal url here it wont work such as: http://www.domain.com/folder/comments.php you will get error messages with that type of url.
  5. Once you have your correct url entered upload the cmps_comments_block.php file to your modules folder.
  6. Next edit the comments.php file which I have attached here that contains the correct fixed code. In the blue highlighted text you must enter in your correct database information.
  7. The red text represents the new code that allows this mod to select your correct table prefix. Example: vb_ which is the default prefix. This code fix will select your correct prefix for you. You do not edit anything here. Without this code in the comments.php file there is no way for this module to work and you will receive the errors that have been reported in this thread. NOTE: The author should correct his original zip file with this updated comments.php file that I have attached here.
  8. Optional: You can choose how many comments to include in the block. This number is marked in green. I set it to 10 in the example below.
  9. Next you must change the two urls to match your site. I labeled these in orange.
  10. Upload the comments.php file to your forum root.
  11. The rest of the author's instructions are correct. (see author's original instructions on how to make a new cmps module.)
Here is the corrected contents of the comments.php file with color highlights to match my above instructions:
Blue = Where you must enter your database information
Red = New table prefix code
Green = Number of comments to include: 10 or 5 or whatever.
Orange = Change the two urls to match your site.
Code:
<?php
// UPDATED comments.php file with small fix tweak by Yotsume
// I spent a while on this please leave the next couple of lines intact
// Coded by Optrex @ www.midlandsweather.org.uk
// Please do not put this onto any other site for download unless permission has been granted by myself (Optrex)
// This script is copyright www.midlandsweather.org.uk 

//edit the variables on the next few lines in order for the script to connect to your  database.
$link = mysql_connect ("database_host", "database_user", "password") or die('I cannot connect to the database.');
mysql_select_db ("database_name")or die("Could not select your database");

// You do NOT need to change the db_table_prefix if you altered it from default to something else the below code will do this for you
$result = mysql_query("SELECT username,title,pagetext,dateline,state,userid,blogtextid
FROM " . TABLE_PREFIX . "blog_text
WHERE title = ''
    AND state = 'visible' 
ORDER BY dateline desc 
LIMIT 10" ) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {

//edit the urls to represent your sites url. (remember to check the /forum folder name)

$comms .= <<<PRINT

<tr>
        <td class="$bgclass" align="left">
            <span class="{$Style['small']}"><a href="http://www.yourwebsite.com/blog.php?bt=$row[blogtextid]">Comment</a> by <a href="http://www.yourwebsite.com/member.php?u=$row[userid]">$row[username] </a><br>$row[pagetext]
 </td>

    
 </tr>
       
  

PRINT;
}

?>
Ok this now works for me but I had to set it as a center block since my members use IMG tags in their blog comments. I hope you all find my instructions helpful. Thanks to "rainyleaves" for helping with the missing table prefix code. Again use the attached fixed comments.php file until the author updates his original zip file.

HAPPY BLOGGING!
Reply With Quote
  #33  
Old 09-16-2008, 04:17 PM
rainyleaves rainyleaves is offline
 
Join Date: Mar 2004
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Congratulations! Yotsume.
Reply With Quote
  #34  
Old 09-30-2008, 02:53 AM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

More Poor Code Problems!

This mod has more problems. If a member posts a comment and makes a few color changes to their text the code will expand the block and destroy the layout of your site by stretching it. Please how can we make it so this mod will not show code in the comments? its showing the raw code and not the styled comments.

So already can you fix this please! This is the only comment cmps mod and its got big problems for site owners!

Please update your mod with a fix so code doesnt show in the comments.
Reply With Quote
  #35  
Old 09-30-2008, 05:47 AM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the same issues with the mod myself but I cannot post an update atm as I am in the process of emigrating from one side of the world to the other and do not have regular PC access. The problem is due to the way the db parses the code into a text string, it just nees some stuff stripping out of it. Shouldn't be too difficult for someone.

Either that or ask your members to post only text based comments.
Reply With Quote
  #36  
Old 10-15-2008, 07:07 PM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by optrex View Post
I have the same issues with the mod myself but I cannot post an update atm as I am in the process of emigrating from one side of the world to the other and do not have regular PC access. The problem is due to the way the db parses the code into a text string, it just nees some stuff stripping out of it. Shouldn't be too difficult for someone.

Either that or ask your members to post only text based comments.

You do realize you have the ONLY Blog Comments module designed to date. Your module is just one step away from perfection. We need to prevent img tabs from showing inside the block. I co NOT have the members of my blog not use img tags in their blogs.

Please someone look at the code of this hack and come up with a way to strip img tags from being pulled into the block. I am going to ask around to other designers who have other types of comments blocks how they are able to prevent this problem in their mods.
Reply With Quote
  #37  
Old 11-13-2008, 05:10 AM
fourat fourat is offline
 
Join Date: Mar 2008
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How i add Recent , Random entries & recent comment to vBadvanced CMPS in the center column under recent threads ? (like attached picture)

i want to add it under recent threads .. it will be beautiful
can you do that ?

templates shown in picture :
- blog_entry_featured
- blog_home

http://img515.imageshack.us/my.php?image=85ah4.gif
Reply With Quote
  #38  
Old 11-13-2008, 06:49 AM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats a standard feature in the blog settings
Reply With Quote
  #39  
Old 11-13-2008, 07:48 AM
fourat fourat is offline
 
Join Date: Mar 2008
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes , but Possible that we use in vBadvanced CMPS
can you do it ?
its will seem so beautiful feature
Reply With Quote
  #40  
Old 01-20-2009, 09:07 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With Long Path Images on the vBAdvanced Page the Blog Comments pesented with this Mod Affect the CMPS Pages where it is presented (Left, Center, or Right Column), because it doesn't Trim the Long Words.

My Best Regards.

Reply With Quote
  #41  
Old 01-22-2009, 10:23 PM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

* It is well documented that this hack does not work in its current state with images or url's in comments. I would suggest that for now you disable the following functionality in blog comments

Maximum Images Per Comment = 0

Then in usergroups, under blog comments
Allow Smilies = no
Allow BB Code = no
Allow [IMG] Code = no
Allow HTML = no
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06859 seconds
  • Memory Usage 2,318KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete