![]() |
|
#1
|
|||
|
|||
|
This CMPS module uses the excellent v3Article system developed by John Warwick. The module displays the 10 most recent articles submitted, in DESC order, (Last article submitted is first in list).
This module also includes the author of the article with a link to his pubilc profile and how many views the article has had. You can vie the module in action on the right hand side of http://www.marijuana.com - the module is titled "The Magazine". http://www.marijuana.com You'll need to upload the php file to your modules directory and create two new templates named "adv_portal_articles" & "adv_portal_articlesbits". Add the contents of the respective text files to the new templates and save. 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 Dont forget to update your index pages(s) to show the new module. Special thanks to wcbryant, who's help has shed new light on vB development for me. Im very grateful for your code additions and help. Maximux1 Marijuana.Com
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist Last edited by maximux1; 06-17-2004 at 11:00 PM. Reason: New package uploaded |
|
#2
|
|||
|
|||
|
lol
U bugger you beat me too it ![]() V nice addon m8 Thanks a lot for this your a star. H |
|
#3
|
|||
|
|||
|
I am getting a parse error on line 41 ?
|
|
#4
|
|||
|
|||
|
Quote:
Sometimes that will cause the error you are speaking of. My file only has 41 lines... Let me know if you would like for me to re-upload the working version that is on my site. Max p.s. Heh, I figured someone was banging away at that - there's a ton more to be done, though. See my more general thread about v3articles (http://www.vbadvanced.com/forum/showthread.php?t=1356)
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#5
|
|||
|
|||
|
Nope no white spaces Please can you upload yours and I will give that a try.
H |
|
#6
|
|||
|
|||
|
I've uploaded a new package - could you please give that a try for me? Should just have to overwrite cmps-articles.php in the mods dir.
thanks!
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#7
|
|||
|
|||
|
Ok that worked fine, I had to alter the table name to add the prefix though
/* Performing SQL query */ $result = $DB_site->query("SELECT articleid, title, commentcount, articleusername, articleuserid, views FROM vb3_article ORDER BY articleid DESC LIMIT 10"); Its working just fine now though thanks ![]() H |
|
#8
|
|||
|
|||
|
ah, good point, didnt think about table prefix users -
I'll fix that and updated the original file. Thanks for pointing that out and your help! Max
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#9
|
|||
|
|||
|
Hey No Probs, thanks for the hack
![]() I am gonna add this together with the featured article hack and combine them into one nice block for the center, I will post it up when and if I get it fone ![]() H |
|
#10
|
|||
|
|||
|
Hey, that sounds like a great idea! Looking forward to it
![]() btw, i've updated the original package to support table prefix's and that parse error. Max
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#11
|
|||
|
|||
|
Script has been edited to no longer show articles waiting to be moderated.
Max
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#12
|
|||
|
|||
|
OK I was gonna merge both hacks together into one PHP script but realised that the authors may not like that too much so I decided to go via the templates route and add them together in one block.
I came up with the block bellow, if anyone wants to know how to do it then I will gladly sort out some instructions and post up my templates etc... I am gonna play about with it later today and make it look a bit nicer but at the moment this is active on my site and fully functional. I would love it however if the featured article script could be made to display the first image [Thumbnailed] in the aricle thread in the block as this would be the icing on the cake for me. Remember its not too complex to acomplish but I would sooner both autors merge thier hacks together and works as one as this is one nice little addition . OH BTW MaxiMux your site is kewl m8, /me heads off for a smoke ![]() H Last edited by Shack Networks; 06-18-2004 at 05:22 AM. |
|
#13
|
|||
|
|||
|
Maximux1, thanks for the excellent addon. Nice site, btw.
If you don't mind me asking, what did you need to do to get the articles themselves integrated with VBA CPMS? I notice all your articles have your left sidebar present when viewing rather than taking up the entire page; I am trying to do the same myself. Any pointers? Thanks again. |
|
#14
|
|||
|
|||
|
Thanks, ixian -
Well - I guess Im not exaclty sure what you're talking about. I have made some changes over the weekend and slightly modified the frontpage so it may be different that what you were speaking of. Be sure to read the instructions carefully. Once you have the module created you can move it anywhere you like on the page using the vBa CMPS module editior. Happy to help further if I can. Max
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#15
|
|||
|
|||
|
No no, I'm not talking about your module - I'm talking about the article addon itself. You appear to have modified it.
What I mean is, when I read the full article, like, say, this one: http://www.marijuana.com/420/article.php?a=11 You have the vba CPMS left sidebar still showing, with your main menu, etc, blocks. The normal Articles addon doesn't do that. I was wondering what you changed. Thanks! |
|
#16
|
|||
|
|||
|
oh oh oh - sorry, I get what you mean, now.
What I did was first, create a new page in vBa CMPS - call it whatever you like, for the page identifier, I used "magazine" - again, use whatever you like. Once you have created the new page in CMPS, you'll need to edit article.php, like so... At the very bottom of article.php you will find the following two lines... PHP Code:
PHP Code:
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#17
|
|||
|
|||
|
Huh. Clearly I am doing something wrong.
I created a new page in CMPS, called it magazine just for testing, added the file edits, now I get a blank page for article.php. I think the instructions above are missing something? How does that tell article.php to use the new CMPS page? |
|
#18
|
|||
|
|||
|
Update: The error message I get when I turn on error messages in php is:
Fatal error: Call to undefined function: print_portal_output() in /var/www/html/forums/article.php on line 1291 Which makes sense, because that doesn't appear to be an existing function. What am I missing? |
|
#19
|
|||
|
|||
|
ah - I forgot to have you add the following code to the TOP of article.php
PHP Code:
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
|
#20
|
|||
|
|||
|
Add those two lines to the top of article.php and that should fix ya up.
Let me know if your still having problems. max
__________________
"There are two ways of being creative. One can sing and dance. Or one can create an environment in which singers and dancers flourish." -- Warren G. Bennis (b. 1925), American writer, educator, University of Southern California sociologist |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Weather Module | cLord | Add-On Modules & Modifications | 157 | 09-08-2006 07:50 PM |
| Scoreboard Module | juanchi | Add-On Modules & Modifications | 60 | 06-14-2006 10:43 AM |
| Basic Module | cLord | Add-On Modules & Modifications | 55 | 04-24-2006 08:45 AM |
| Module: Countdown to certain date | 58sniper | Add-On Modules & Modifications | 36 | 10-26-2005 01:57 PM |
| Module: Virus Map | 58sniper | Add-On Modules & Modifications | 9 | 06-05-2005 05:14 AM |