vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [ADDON] cinq's vbArticles Latest 3 Featured Articles CMPS Module (https://vborg.vbsupport.ru/showthread.php?t=76823)

cinq 02-21-2005 10:00 PM

[ADDON] cinq's vbArticles Latest 3 Featured Articles CMPS Module
 
A small addon to show the latest 3 featured articles on your Portal page.
This add on CMPS module is for cinq's vbArticles Hack v2.0

Hack version 1.1

Install instructions
===========================================

1. Upload the cmps-articles.php file to your modules directory.

2. Create 2 new templates:

a. First template:

adv_portal_articlesbits
Code:

        <tr>
                <td class="$getbgrow" width="100%">
                <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="0" class="tborder" width="100%">
                <tr>
                <td width="20%" align="center">$articonimg</td>
                <td width="80%" align="left"><span class="smallfont"><b>Title: <a href=$vboptions[bburl]/articles.php?action=viewarticle&artid=$articleid>$title</a></b>
                <br>$summary</span></td>
                </tr>
                </table>
                </td>
        </tr>

b. Second template:

adv_portal_articles
Code:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
        <tr>
                <td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Featured Articles</strong></span></td>
        </tr>
$articlesbits
</table>
<br />

3. Next, perform the following file edits.

a. In your global.php file

FIND
PHP Code:

$specialtemplates array_merge($specialtemplates
        array(
            
'adv_modules',
            
'adv_portal_opts',
            
'attachmentcache',
            
'bbcodecache',
            
'birthdaycache',
            
'eventcache',
            
'iconcache',
            
'maxloggedin',
            
'smiliecache',
            
'userstats'
        
)
    ); 

REPLACE WITH
PHP Code:

$specialtemplates array_merge($specialtemplates
        array(
            
'adv_modules',
            
'adv_portal_opts',
            
'attachmentcache',
            
'bbcodecache',
            
'birthdaycache',
            
'eventcache',
            
'iconcache',
            
'maxloggedin',
            
'smiliecache',
            
'userstats',
            
'vbart_options'
        
)
    ); 

Save and upload global.php


b. In your includes/vba_cmps_include_top.php file

FIND
PHP Code:

$portalopts unserialize($datastore['adv_portal_opts']); 

ADD ABOVE
PHP Code:

$vbart_options unserialize($datastore['vbart_options']);
unset(
$datastore['vbart_options']); 

Save and upload includes/vba_cmps_include_top.php


4. Next, create the new module using the drop down menu, selecting "cmps-articles.php".
In the "templates used" field enter the following templates: 'adv_portal_articles, adv_portal_articlesbits'

5. Don't forget to update your index pages(s) to show the new module.

6. Done !

===========================================

Enjoy :)
- cinq

ptmuldoon 02-22-2005 02:07 PM

Works great, except I had to modify the cmps-articles.php file on line 20 to correct for the image not showing on the home page. They originally showed only if you were within your forums page. Thus, I edited it to this

Code:

$articonimg = "<a href=\"$vboptions[bburl]/articles.php?action=viewarticle&artid=".$articleid."\"><img title=\"".$title."\" src=\"$vboptions[bburl]/articles.php?action=thumb&artid=".$articleid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth']."></a>";

KTBleeding 02-22-2005 02:33 PM

Thanks cinq.

And thanks ptmuldoon, I was just going to come report that..

cinq 02-23-2005 08:25 AM

Thanks for the feedback guys, I have editted the file and reuploaded it.

For those who installed this add-on prior to the date/time of this post, just download the attachment again, and upload it, overwriting your existing cmps_articles.php file.

shadiguy1 02-23-2005 11:20 AM

hmm i did didnt show up tho. im looking into it.

cinq 02-25-2005 03:42 AM

Made some code change in the cmps-articles.php file.
If you had previously installed this add-on ( v1.0 ) please download the attachment ( v1.1 ) and upload it to your modules folder, overwriting the old file.

Everything else ( other steps highlighted in the first post ) remains the same.

ncangler 02-25-2005 04:28 AM

Cinq, I cannot thank you enough for all the great work you'd put into this Articles system. I love it and it has added so much potential to my site. Thank you!

Chief Corn 02-25-2005 08:39 AM

i'm not the greatest with html, so any chance someone can make a template to list horizontally as is done in the main article index? i'd appreciate it. excellent hack.

cinq 02-28-2005 10:44 AM

You mean in columns instead Chief ?

yannisc 02-28-2005 06:55 PM

Hi!

How can I make the image of the article on the main page be wrapped from the text rather than be left and the text right?

There was a hack that did something similar for the news posts on the vbadvanced cmps. Can we make the same here?

thanks, Yannis

Chief Corn 02-28-2005 07:57 PM

Quote:

Originally Posted by cinq
You mean in columns instead Chief ?

yes. with my site the news already takes up alot of the row space.

Deviant++ 03-01-2005 09:13 AM

I'm getting an error when I'm putting in the include file.

the article system says syntax error 1064 and the cmps portal dosn't display images.

misticjeff 03-04-2005 09:27 AM

Quote:

Originally Posted by cinq
You mean in columns instead Chief ?

I'd also like to see perhaps 3 recent articles all in one row on the CMPS home instead of each article using it's own row. This way I could feature it in the center column above the news right at eye level without taking up too much precious real estate.

lwhite 03-13-2005 04:55 AM

I followed the instructions, but it did not showing up on my portal. Any suggestions?

When I try to add the module, i get the following SQL error:
Quote:

Invalid SQL: UPDATE 1adv_modules SET title = 'Latest Articles', identifier = 'latestarticles', filename = 'cmps-articles.php', displayorder = '4', modcol = '2', inctype = '0', templatelist = ''adv_portal_articles, adv_portal_articlesbits'', userperms = '1,2,3,4,5,6,7,8', active = '1' WHERE modid = '14'
mysql error: 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 'adv_portal_articles, adv_portal_articlesbits'', userperms = '1,

mysql error number: 1064

Date: Sunday 13th of March 2005 02:01:09 AM
Script: http://www.slackerssoapbox.com/forum...cmps_admin.php
Referer: http://www.slackerssoapbox.com/forum...odule&modid=14

ccplim 03-13-2005 07:50 AM

Nice one. Installed on my test machine and it works perfectly.

Btw, is it possible to display the beginning portion of the article (say, the first 1000 words)? I noticed mine only display the article title and summary.

deb0 03-14-2005 02:44 AM

Quote:

Originally Posted by ccplim
Nice one. Installed on my test machine and it works perfectly.

Btw, is it possible to display the beginning portion of the article (say, the first 1000 words)? I noticed mine only display the article title and summary.

Excellent, u read my mind! I need the same thing.

YLP1 03-17-2005 06:02 PM

I have a slight problem...the paths with this mod have the admin section as admincp my admin folder is just admin....

I removed the cp from the install files but I can't get the mod to update the templates etc.

Is there a way to uninstall this, correct the admin path and then reinstall?

cobraclub 03-18-2005 12:26 PM

Does this only display featured articles, or can it be configured to display latest articles, if so, how?

Many thanks and great hack.

RichieBoy67 03-21-2005 09:21 PM

Will this work with VBPortal???

Aceman 03-27-2005 08:54 PM

I could definately use a column version of this hack.

Aceman

Blam Forumz 03-27-2005 10:12 PM

is it possible to make it look like how the features articles bit looks on the actual articles section?

Blam Forumz 03-27-2005 10:38 PM

Ok, i've done a bit of editing heres my templates:

adv_portal_articles

HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr><td class="tcat" align="left">$vbphrase[vbart_featured]</td></tr>
<tr>
<td class="alt2" align="left" valign="top">
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="left">
<tr>$articlesbits</tr>
</table>
</td>
</tr>


and

adv_portal_articlesbits

HTML Code:

<td valign="top" align="center" class="alt1" width="20%">
<a href="articles.php?action=viewarticle&artid=$featuredid">$articonimg</a><br>
<a href="articles.php?action=viewarticle&artid=$featuredid">
<span class="smallfont"><b>$title</b></span></a>
</td>


But look at my index:

www.blaminator.co.uk

the tables are touching, if i add a <br> it messes everything up :/

synn 03-28-2005 10:20 PM

Quote:

Originally Posted by Blam Forumz

the tables are touching, if i add a <br> it messes everything up :/


At the end of "adv_portal_articles" add:

HTML Code:

</table><br>
I like it displayed better this way. :up:

Thanks for the idea! :)

jzewatsky 03-31-2005 10:33 PM

Is there a way to change the display order of the featured articles so that the most recient article is on top?

subnet_rx 04-01-2005 05:45 PM

Quote:

Originally Posted by ncangler
Cinq, I cannot thank you enough for all the great work you'd put into this Articles system. I love it and it has added so much potential to my site. Thank you!

I've got to agree. Great work, please keep it up.

ncangler 04-05-2005 08:51 PM

I've installed on my 3.0.7 and CMPS 1.0.1 site (www.triumphowners.org) and image shows up fine in the Articles page but not on the CMPS portal page. I installed the revised cmps_articles.php file but no good. CMPS portal page seems to load slower now too. Any help is most appreciated.

Princeton 04-05-2005 08:55 PM

Quote:

Originally Posted by ncangler
I've installed on my 3.0.7 and CMPS 1.0.1 site (www.triumphowners.org) and image shows up fine in the Articles page but not on the CMPS portal page. I installed the revised cmps_articles.php file but no good. CMPS portal page seems to load slower now too. Any help is most appreciated.

I notice this is using the datastore ... make sure you upgrade your PHP to version 4.3.11. 4.3.10 has an unserialize() bug. You should see a noticable difference when you do.

ncangler 04-05-2005 09:10 PM

Thanks for the quick reply Princeton. What is the datastore? I assume I'd have to ask my server supplier to upgrade the PHP, but any concerns on affecting anything else if they do?
Randy

Quote:

Originally Posted by princeton
I notice this is using the datastore ... make sure you upgrade your PHP to version 4.3.11. 4.3.10 has an unserialize() bug. You should see a noticable difference when you do.


Princeton 04-05-2005 09:13 PM

there shouldn't be any problems .. it's a simple upgrade

You do not need to do anything on your end.

ncangler 04-05-2005 09:29 PM

Thank you for the suggestion. I have already emailed them asking that this be done. :)

Quote:

Originally Posted by princeton
there shouldn't be any problems .. it's a simple upgrade

You do not need to do anything on your end.


subnet_rx 04-06-2005 07:03 PM

I've installed this hack but can't get it to show up, what should I check? What do you mean by refreshing the index page? I'm using vBAdvanced.

EDIT: I just installed the top_rep hack for vBA with no problems. The box for this hack isn't even showing up.

ncangler 04-08-2005 02:52 AM

I've installed everything identical to my 3.0.5 setup on another site but this 3.0.7 install doesn't show the image on the CMPS page. It shows fine within the Articles portion of the site. (www.triumphowners.org)

Any ideas?

ncangler 04-08-2005 02:54 AM

In the attached photo you'll notice that there is a larger border on the middle of three articles being featured on the CMPS page. How can I change the border on the center display so that all three featured articles look the same? Thanks!

I'll bet it is the alternating colors 1 and 2 isn't it? How would I override that for this display?

ncangler 04-08-2005 03:12 AM

I'm stumped. I've done everything I can think of but the image does not show up on the CMPS page. I've attached an image showing the article image displayed on the ARticles page and an image that shows the image no show on the CMPS.

It is very strange cause it works on one of my sites but not the other. The files on both sites are identical (except path info). The only difference between the two sites is that the one that works is running vBulletin 3.0.5 and the one that doesn't is running 3.0.7. Any ideas are appeciated. Thanks.

ncangler 04-08-2005 03:16 AM

Be sure to activate the new module (mine is called "Featured Articles") in your AdminCP (vBa CMPS, Edit Modules, Featured Articles). Then you need to make sure it is turned on for the particular page where you want it to appear. I have mine on my main page so I edit the Default/Home Page (AdminCP, vBa CMPS, Edit Pages, Default/Home Page). Hope this helps!

Quote:

Originally Posted by subnet_rx
I've installed this hack but can't get it to show up, what should I check? What do you mean by refreshing the index page? I'm using vBAdvanced.

EDIT: I just installed the top_rep hack for vBA with no problems. The box for this hack isn't even showing up.


subnet_rx 04-08-2005 05:31 PM

yep, both are checked. I may move away from this system anyway, since it will be paid in the future.

redcow 04-10-2005 12:05 PM

thanks

ncangler 04-12-2005 12:21 AM

Okay I've got to quit working on the computer so much. I found the problem. Somehow in the process of editing three sites I forgot to add the vba_cmps_include_top.php edit. Sorry!

Quote:

Originally Posted by ncangler
I'm stumped. I've done everything I can think of but the image does not show up on the CMPS page.


TTG 04-14-2005 01:59 PM

Installed and module shows without picture .. when I try and add the vba_cmps_include_top.php edited file I receive error :-

Code:

Database error in vBulletin 3.0.6:

Invalid SQL: 
    SELECT a.title, a.articles_articleid, a.icon, SUM(r.rating) / COUNT(r.rating) avg
    FROM articles_article a
    LEFT JOIN articles_rating r
    ON a.articles_articleid = r.articleid
    WHERE a.featured=1
    GROUP BY a.articles_articleid
    ORDER BY RAND()
    LIMIT 
   
mysql error: 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 '' at line 8

mysql error number: 1064


kissmans 06-10-2005 12:26 PM

please tell me what happen when i install it.



Quote:

SELECT a.article_articleid, a.title, a.summary, a.iconid
FROM nhactinhvienxu_us_-_diendan.article a
LEFT JOIN nhactinhvienxu_us_-_diendan.article_category c
ON a.categoryid = c.article_categoryid
WHERE a.categoryid != '0' AND a.draft !='1' AND a.featured=1
ORDER BY a.publishdate DESC
LIMIT 3
mysql error: You have an error in your SQL syntax near '-_diendan.article a
LEFT JOIN nhactinhvienxu_us_-_diendan.article_catego' at line 3

My Full Database infor


Database nhactinhvienxu_us_-_diendan - Table article running on localhost


All times are GMT. The time now is 05:02 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.01409 seconds
  • Memory Usage 1,858KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_html_printable
  • (4)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete