View Full Version : v3articles Module - basic
Bryant
06-16-2004, 07:41 PM
This takes the same featured article teaser that displays on your article.php page, and pulls it in as a center column module in CMPS.
The template is easy to edit, so you should be able to have it show up any way you like. The number of characters to be displayed is controlled by what you set (or is set by default) in the v3article settings, but could be hard coded in cmps_feature if you wish it to be different.
I said 'basic' in the subject line, because there are other people working on much more advanced and involved implementations of this. Also, the image handling code is commented out in cmps_feature.php, it should work fine if you remove the comments, but that's not something I've tested as I don't want the image functionality for the front page.
Thanks to John for v3articles and Brian for both CMPS and the last key bit of info that made this module work.
himerus
06-16-2004, 08:40 PM
Looks great!!!!!
As soon as I get the v3articles installed here in a few, I'll throw in this module.
Thanks!!!
maximux1
06-16-2004, 08:48 PM
hrm, cant seem to get it to work. I have v3articles and CMPS installed - I've followed your directions step by step and yet, I do not get the module to dislpay, anywhere.?
Still trying to figure it out, but if if you can think of anything, i'd appreciate it.
Max
maximux1
06-16-2004, 08:53 PM
ya, strange - second time through the instructions with the same result. I made sure I had an article selected as featured...any ideas?
maximux1
06-16-2004, 08:58 PM
ok sorry - I made an error on the template name.
I have this module working. Looks good, need to do some template modification, but NICE JOB!
http://www.marijuana.com
Socket
06-17-2004, 08:50 AM
Cheers for this Bryant :)
himerus
06-17-2004, 11:59 AM
I've got it working properly @ http://www.myispforum.com/home.php
I edited the code in the PHP file to look like this:
$feature['postbody'] = parse_bbcode2($feature['postbody'], $dohtml, 0, $dosmilies, 1);
$feature['postbody'] = truncate_text($feature['postbody'], $vboptions['featuredlength'], 1);
I moved the parsebbcode function above the truncate_text function, so that stray bbcode wouldn't fall into the featured section... I'm not sure if that will cause other problems or not, but I think it looks better. :D
Great work on the module. :D
BoNfiRe
06-18-2004, 10:55 AM
ok I have gone through the instructions loadsa times but can't find what I was doing wrong so I decided to take a look in cmps_feature.php and noticed that there was two fetch_templates ( article_cmps, and adv_portal_blog ) and yet only 1 in the instruction ( adv_portal_blog ). But weird is how some of you got it to work lol :s any help would be greatly appreciated.
B
maximux1
06-18-2004, 11:04 AM
Go back through the instructions on this one - it works like a charm right out of the box.
The ONLY gotcha that I can think that you MAYBE ran into is this...
==[Step 2]=============================
Create the adv_portal_blog template, paste in the code from the text file provided (tweak as you desire).
Make sure you didnt create a template named "adv_portal_blog template" - notice the space in the template name! I did this on my first run through the instructions and the module simply would not display, didnt get an error either.
Just make sure you followed the instructions and have v3 Articles / vBa CMPS / vB3.0.1 installed.
Nice module hack for certain - Great job, Bryant!
BoNfiRe
06-18-2004, 12:48 PM
thx for the help maximus but no luck I had done all the instructions correctly it just doesn't work for me which is wierd lol it displays fine there is just no content, and yes I do have v3 Articles / vBa CMPS / vB3.0.1 installed. :D
Bryant
06-19-2004, 01:14 AM
thx for the help maximus but no luck I had done all the instructions correctly it just doesn't work for me which is wierd lol it displays fine there is just no content, and yes I do have v3 Articles / vBa CMPS / vB3.0.1 installed. :D
Doublecheck the edit you made to global.php, sounds like that might be where the problem is.
Don't sweat the two template thing, originally there were two, reduced it to one to make the install quicker and easier. The mention of it in the .php code isn't hurting anything.
chris_
06-20-2004, 12:42 AM
i'm installing the mod and I can't find the 'adv_modules', or 'adv_portal_opts', in this step:
==[Step 3]=============================
Edit global.php;
--{find}-------------------------------
'adv_modules',
'adv_portal_opts',
--{replace with}-----------------------
'adv_modules',
'adv_portal_opts',
'featuredarticle',
Is this code that should have been added previously.. and if so, could someone let me know exactly where it goes?
thanks
Can somebody please tell me how to make this module collapsable like the mod at
http://www.vbadvanced.com/forum/showthread.php?t=1044 does?
Acido
06-24-2004, 11:39 AM
Thanx Bryant!
But, is possible do a FULL article integration, geting templates from vb3 articles to use in CMPS ?
I think that is posible get url's like: ...cmps_index.php?page=articles&a=5
where a=5 is the article ID to parse into a CMPS page the entire content of the article_display template from the hack.
I'm touching some things, but my skill only let me copy and paste some php codes :(
So all what i can do is give a suggestion to our guru's to do a mod with working pages like this :
http://www.webconferencia.net/images/screen.gif
Thanx ! :D
mclark2112
06-27-2004, 02:38 PM
Cna we get the attached image to come through into this block? Like it does on the article.php page?
FleaBag
07-02-2004, 11:42 AM
Worked perfectly on first try, thanks. :)
Viktor Kraft
07-07-2004, 08:46 PM
Thanx Bryant!
But, is possible do a FULL article integration, geting templates from vb3 articles to use in CMPS ?
I think that is posible get url's like: ...cmps_index.php?page=articles&a=5
where a=5 is the article ID to parse into a CMPS page the entire content of the article_display template from the hack.
I'm touching some things, but my skill only let me copy and paste some php codes :(
So all what i can do is give a suggestion to our guru's to do a mod with working pages like this :
Thanx ! :D I hope you release something like that ^^
Jason McConnell
07-15-2004, 12:55 AM
I can't seem to get this one working... the articles system works just fine but nothing's showing up on the front page. Here's a screenshot I have for the module, and I'm pretty sure this is right. Any idea what I'm doing wrong?
Ted S
07-15-2004, 11:16 AM
Great hack... for some reason I can't get it to work properly however, when I enable it and lod my portal page I get all blank like theres an error somewhere but it doesnt show up. I've double checked and the template is in place as is teh change to global.php, what could be wrong?
Jason McConnell
07-16-2004, 06:23 AM
Great hack... for some reason I can't get it to work properly however, when I enable it and lod my portal page I get all blank like theres an error somewhere but it doesnt show up. I've double checked and the template is in place as is teh change to global.php, what could be wrong?
I'm having the same problem, the table cell appears, but there's nothing in it except for a link to the articles section. I *think* the code in the template is right, I commented in the full path to specific files. Some help on this would be greatly appreciated :D
AlexSFBay
08-25-2004, 12:15 AM
I still haven't installed vB CMPS yet, but I was wondering if CMPS can pull news stories from the articles section (v3 Articles) of the forum? I'm guessing it can. All I would need to do is plugin the forum id for the article section section, right?
Fargo
08-25-2004, 12:13 PM
I still haven't installed vB CMPS yet, but I was wondering if CMPS can pull news stories from the articles section (v3 Articles) of the forum? I'm guessing it can. All I would need to do is plugin the forum id for the article section section, right?
Honestly, forumID's have nothing to do with pulling the article out of the database since v3Articles uses its own tables. Explain a bit further here (or a new thread if this mod isnt involved) so ppl know what youre trying to do.
AlexSFBay
08-25-2004, 01:31 PM
If that's the case, can vB CMPS pull news by assigning some kind of variable from the v3Articles table? Honestly, all I would like to do is use articles for news posts, not forum threads.
Samir
09-08-2004, 04:58 PM
i'm installing the mod and I can't find the 'adv_modules', or 'adv_portal_opts', in this step:
==[Step 3]=============================
Edit global.php;
--{find}-------------------------------
'adv_modules',
'adv_portal_opts',
--{replace with}-----------------------
'adv_modules',
'adv_portal_opts',
'featuredarticle',
Is this code that should have been added previously.. and if so, could someone let me know exactly where it goes?
thanks
I've run into exactly the same problem. I've checked all the global.php files and nothing. Anyone?
Samir
09-08-2004, 05:31 PM
I've run into exactly the same problem. I've checked all the global.php files and nothing. Anyone?
Nevermind. I found it. Just was formatted differently. :rolleyes:
Samir
09-08-2004, 05:45 PM
Well, now I get a blank page on my forums home and cmps home when the module is enabled. :confused: I looked in the cmps_feature.php and it tries to eval a template called "article_cmps" which I don't have. :confused: Any assistance appreciated.
Samir
09-08-2004, 08:00 PM
I've tried executing the cmps_feature.php file directly and I get the following error:
"Warning: main(./includes/functions_articles.php) [function.main]: failed to create stream: No such file or directory in i:\wampp13cs\htdocs\vb3\modules\cmps_feature.php on line 3
Fatal error: main() [function.main]: Failed opening required './includes/functions_articles.php' (include_path='.;c:\php4\pear') in i:\wampp13cs\htdocs\vb3\modules\cmps_feature.php on line 3"
Worked 1st time on my cmps .. thanks
Samir
09-13-2004, 08:49 PM
I still need help. I'd love to use this, but I can't figure out what's wrong.
Milorad
09-19-2004, 12:53 PM
ok I have gone through the instructions loadsa times but can't find what I was doing wrong so I decided to take a look in cmps_feature.php and noticed that there was two fetch_templates ( article_cmps, and adv_portal_blog ) and yet only 1 in the instruction ( adv_portal_blog ). But weird is how some of you got it to work lol :s any help would be greatly appreciated.
B
I too am failing miserably.
I would really love to use this, but I get no joy.
Milorad
09-19-2004, 12:56 PM
Worked 1st time on my cmps .. thanks
I noticed its not actually enabled on your site, how come?
I can't make it work, and I would love some help from anyone who has managed to do it.
Milorad
09-20-2004, 05:25 AM
it works fine if I use the "print output" line (which just renders it as a page, not a module)... but evaluating it as a module doesnt work.
could it be conflicting with something?
Milorad
09-24-2004, 04:09 PM
I'm sorry to keep bumping this, but I am pretty desperate to get this working, and I don't understand why its not.
this is basically just a cut and paste from the article.php with a few small modifications to make it work inside a module (which doesnt seem to actually make it work as a module for ME).
I have followed the instructions, and as I say, when told to "print output" it works, and fetches the correct templates, etc, it just doenst work when told to render as a module.
Any help would be greatly appreciated.
I noticed its not actually enabled on your site, how come?
I recently transferred my main page to the same host I'm using for the forum and therefore saw no reason to keep it running until I decide a better use for it :)
58sniper
09-26-2004, 09:02 AM
Has anyone figured out a valid XHTML way of doing this? This method breaks validation horribly.
bugzy
09-27-2004, 06:51 PM
anyone have a link to v3articles??
Samir
09-27-2004, 06:58 PM
http://www.vbulletin.org/forum/showthread.php?t=65934
Milorad
09-29-2004, 05:26 PM
Has anyone figured out a valid XHTML way of doing this? This method breaks validation horribly.
I couldnt care less about validation, I just wish I could make it work :(
thing is, I'm not a dumbass... I've managed to make everything else work fairly well, and put one or two things together myself.... but this just wont go...
and I can't figure out why, since the code is pretty much just cut/pasted from the v3articles php file, and tied in with another cut/paste to evaluate as a module, rather than print as a page.
I'm bloody tearing my hair out.
Samir
09-30-2004, 03:57 AM
What I plan to do is try reinstalling it from scratch and see if that changes anything. I might suggest you do the same.
58sniper
09-30-2004, 07:38 AM
I couldnt care less about validation,But you should. Utilizing standards compliant code achieves several things:
1. It further assists in rendering pages the same across various browsers (many of which adhere to those same standards). While many of your users may use IE, what about the others? Firefox, Opera, mobile devices, etc.
2. It helps render things quicker.
3. When standards compliant code is used, it make it easier to troubleshoot.
The problem with this module is it uses code that works elsewhere, under the assumption that it would work fine here. But if you look at the resulting code, you realize that the adv_portal_articles template calls the $articlesbits from within <td> tags. But the articlesbits templates wraps its content in <tr> tags. You CAN'T nest <tr> tags within <td> tags. Thats not valid in XHTML. Or HTML. You'd have to further wrap articlesbits in <table> tags. But, in this instance, that breaks the appearance of the module (not to mention it creates further nested tables, which hampers performance - but that's a whole other topic).
I think he meant that he couldn't care less because he can't get it to work. Since nothing is showing then XHTML compliance doesn't matter.
Now, I'm using vbulletin 3.03 and the vArticles shows when I use /article.php however the cmps module does not display anything. So, I'm in the same boat here as a few others.
Shouldn't I be able to run this ...
http://www.whatisnew.com/dailynews/modules/cmps_feature.php
and actually see something?
Would someone mind running this cmps_feature.php on one of the working sites.
58sniper
09-30-2004, 08:56 AM
Now, I'm using vbulletin 3.03 and the vArticles shows when I use /article.php however the cmps module does not display anything. So, I'm in the same boat here as a few others.
Shouldn't I be able to run this ...
http://www.whatisnew.com/dailynews/modules/cmps_feature.php
and actually see something?
Would someone mind running this cmps_feature.php on one of the working sites.Mine works fine when viewed as a module on the CMPS page (except for the validation). Attempting to run the module itself as a php file gets:
Fatal error: Call to a member function on a non-object in /path/to/mysite/forum/modules/cmps-articles.php on line 3
My site is running it in development stage, so I can't provide a live link.
Mine works fine when viewed as a module on the CMPS page (except for the validation). Attempting to run the module itself as a php file gets:
Fatal error: Call to a member function on a non-object in /path/to/mysite/forum/modules/cmps-articles.php on line 3
My site is running it in development stage, so I can't provide a live link.
Would you mind taking a screenshot of the way you setup the module in CMPS. I want to make sure that I'm interpreting the directions correctly. I keep getting a blank page when I enable the module OR I get the table but without text or links to the article.
I can run vArticles separately.
Thanks.
Samir
10-03-2004, 01:05 PM
Would you mind taking a screenshot of the way you setup the module in CMPS. I want to make sure that I'm interpreting the directions correctly. I keep getting a blank page when I enable the module OR I get the table but without text or links to the article.
I can run vArticles separately.
Thanks.
I get the same thing. I still haven't found a solution. :(
58sniper
10-03-2004, 07:20 PM
Would you mind taking a screenshot of the way you setup the module in CMPS. I want to make sure that I'm interpreting the directions correctly. I keep getting a blank page when I enable the module OR I get the table but without text or links to the article.
I can run vArticles separately.
Thanks.See this screenshot (http://www.runningwolf.com/crap/articles.gif) to see how my module is setup.
Graham
10-05-2004, 12:36 PM
Samir,
Think I´ve ran in to this also, I´ve noticed that when I included the file cmps_feature.php then go back to edit the module its been disabled for some reason?
I get the module displayed with a "read more" but no preview...
Samir
10-05-2004, 12:42 PM
I can't even get that much. My screen will just be blank.
xrayhead
10-22-2004, 04:38 PM
Worked first time guy's thanks......
Anyone sussed out how to get the thumnail imported to the module as well????
Xrayhead
burrelly
11-18-2004, 11:51 AM
Parse error: parse error, expecting `')'' in /home/virtual/site5/fst/var/www/html/global.php on line 30
Fatal error: Call to undefined function: print_portal_output() in /home/virtual/site5/fst/var/www/html/index.php on line 29
get the above error
burrelly
11-18-2004, 12:39 PM
Problem sorted had an extra ,
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.