![]() |
|
#1
|
|||
|
|||
|
I desperately need a CMPS module for v3articles, and after asking about it in a couple places a few days ago, decided I'd try to see if I could make one myself.
First, let me say I know no PHP, I have no real capacity with code, I've just been slogging through this with trial and error for the past few days. So if something is stupidly handled below, that's why. ![]() When I use eval('print_output, and run this .php file from the modules directory for CMPS, it successfully pulls the featured article and displays it. But when I comment out print_output, and replace it with eval('$home[$mods as other modules use, it doesn't pull anything at all into the module I created on the site. For the sake of simplicity, I'm not even trying to pull the featured article image, if there is one. One thing at a time. Is there an easy answer as to why it won't populate the module on the CMPS index page? PHP Code:
Last edited by Bryant; 06-13-2004 at 07:20 PM. |
|
#2
|
|||
|
|||
|
There's someone else's thread on a similar issue here, just as an FYI. Still hoping someone can shed some light here, but I'll just be happy when any v3articles->CMPS module is ready.
|
|
#3
|
||||
|
||||
|
Well I can tell you that first off, all of this should be removed:
PHP Code:
|
|
#4
|
|||
|
|||
|
Quote:
Installer: Installs settings, phrases, templates and everything. I did it this way so I can turn various options on and off as I see fit. Options: Look at the news options in VBA CMPS and I just replicated that. I added a category icon thing and a category title thing as well. I was having some mySQL errors, but once I fixed those it still displayed nothing. Like I said in my other post, 90% of the code (the installer, and the article.php file) is from the vba cmps files themselves. If Bryan will let me, I will zip everything up with some quick documentation and attach it so someone else can finish it up and get it working. I really have no idea what I am doing here really, so if I am allowed to post what I have done it would be great. |
|
#5
|
|||
|
|||
|
Quote:
decipher, I think we're both falling prey to the same problem. Like I said, I was able to get it to spit out the featured article on its own page by running the .php from the /modules directory, but for some reason, it will not work once pulled into the CMPS index. Brian, appreciate you taking a look, here are the two templates; adv_portal_blog; <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> <tr> <td class="tcat">Featured Blog</td> </tr> <tr> <td class="$getbgrow" align="left" valign="top" width="100%">$articlecontent</td> </tr> </table> <br /> article_cmps; <span class="smallfont">$feature[postbody] <a href="article.php?a=$featuredarticle[id]">continued</a></span> The settings I used to create the module were pretty cut and dry. Pointed to the .php file, set it to active, and put "adv_portal_blog,article_cmps" in Templates Used. Last edited by Bryant; 06-15-2004 at 07:18 PM. |
|
#6
|
||||
|
||||
|
I think I may see the problem. You're using the variable $datastore['featuredarticle'] in the code, which indicates that you're trying to pull some cached data from the datastore table. Did you add the 'featuredarticle' field to your specialtemplates array? If not, open your global.php file and look for:
PHP Code:
PHP Code:
|
|
#7
|
|||
|
|||
|
That worked fine m8
is there any way of pulling more than one article ?H |
|
#8
|
|||
|
|||
|
Think you can take a look at what I am attempting to do as well? Everything that I put in the datastore table is already using the "adv_portal_ops" so I would assume that I wouldn't need to add any other specialtemplates correct?
I fear putting the files up here because the code isn't really mine. I am sure that there might be an easier way to do it, but I like having options. I have no idea what the hell I am doing but I am trying. Let me know please. I'd imagine that most of the work is already done, I just need to figure out the query to pull all the info correctly and then get it to display. I guess I will go over some of the info for what I have going on: New rows in adv_settings Code:
Var Group Value Defaultvalue Optioncode Displayorder portal_article_enablearchive adv_portal_article 2 2 18 portal_article_archivepreview adv_portal_article 1 1 yesno 19 portal_article_maxarticle adv_portal_article 0 2 2 portal_article_maxchars adv_portal_article 500 500 3 portal_article_catid adv_portal_article 2 0 1 portal_article_allowcomments adv_portal_article 1 1 yesno 4 portal_article_showavatar adv_portal_article 1 1 yesno 6 portal_article_articleicon adv_portal_article 1 1 yesno 7 portal_article_showrating adv_portal_article 1 1 yesno 8 portal_article_showattachments adv_portal_article 1 1 yesno 5 portal_article_showsendfriend adv_portal_article 1 1 yesno 9 portal_article_enablehtml adv_portal_article 1 0 yesno 10 portal_article_enablevbcode adv_portal_article 1 1 yesno 11 portal_article_enablevbimage adv_portal_article 1 1 yesno 12 portal_article_enablesmilies adv_portal_article 1 1 yesno 13 portal_article_dateformat adv_portal_article M d, Y - g:i A M d, Y - g:i A 14 portal_article_categorytitle adv_portal_article 0 0 yesno 15 portal_article_categoryicon adv_portal_article 0 0 yesno 16 adv_portal_article 2 Rows in adv_modules Article & Articlearchive (same settings as your news and news archive) The options sits right underneath the news options in the default settings page for cmps, all the phrases/settings/templates were entered using the vba cmps installer. If you are too busy to help thats cool with me, I would only need the OK to let someone else help me. |
|
#9
|
|||
|
|||
|
Quote:
I did add the forum icon hack from Livewire to v3articles so it will be able to have category icons/images that are seperate from the users avatar. Handy if you have different categories and are looking for that "nuke" type look I guess. |
|
#10
|
|||
|
|||
|
OK I got it to display and did some template tweeking.
I want to know if theres any way this can be altered to say pull the top 5 latest articles from the database and display them as in the pic I posted. H |
|
#11
|
|||
|
|||
|
Maybe also display the first attached image as a thumbnail next to the title and content ?
H |
|
#12
|
|||
|
|||
|
Quote:
If I am way off here, I apologize, I have no idea what I am doing. |
|
#13
|
|||
|
|||
|
Quote:
|
|
#14
|
||||
|
||||
|
You should post this in the Add-On Modules forum.
|
|
#15
|
|||
|
|||
|
Good job Bryant. Glad you made it work for yourself. I am completely stuck on mine. If I put the mySQl query in vba_cmps_include_top.php I don't recieve any errors any more. So at least I got that fixed (I guess). Everything is there, just nothing is being displayed.
I have been messing with this for about 4 days now. Think it's time to give up. |
|
#16
|
|||
|
|||
|
It's in the User Add-on Modules forum now, here, thanks Brian.
It's also at vb.org here. Decipher, I know a lot of people would probably be more interested in your implementation. Hopefully you can get it figured out. If anyone downloaded the .zip I had in this thread, you may need to adjust the template I had in there depending on where you load your CMPS index from. It was missing '$vboptions[bburl]/' before, the current .zip has that, but wanted to point it out. Shouldn't affect most, but in my case, I load my front page from a different subdomain, so I needed that correction. Last edited by Bryant; 06-16-2004 at 08:07 PM. |
| 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 |
| vBadvanced CMPS Released! | Brian | Announcements | 28 | 06-13-2004 01:02 PM |