The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB Journal | vba CMPS module: latest entries Details »» | |||||||||||||||||||||||||||
vB Journal | vba CMPS module: latest entries
Developer Last Online: Jul 2013
This hack is for [vB 3.0.3] - vB Journal for vBulletin 3.0.3(v1.0.0) and [vB 3.0.3]
Hi, this is the Brahm's vbindex conversion for vba CMPS: this module will show latest journal entries in a box in your CMPS system. demo: http://www.wellage.net Here we go: touch /path_to_your_forum_dir/modules/journalentries.php ----------------------------------------- PHP Code:
then create template 'adv_portal_latestjournalentry' ----------------------------------------- Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> <thead> <tr> <td class="tcat"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('cmps_pagesmenu')"><img id="collapseimg_cmps_pagesjournal" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_cmps_pagesjournal].gif" alt="" border="0" /></a> <span class="smallfont"><strong>$vbphrase[adv_latest_journalentries]</strong></span> </td> </tr> </thead> <tbody id="collapseobj_cmps_pagesjournal" style="$vbcollapse[collapseobj_cmps_pagesjournal];text-align:$stylevar[left]"> $latestentrybits </tbody> </table> <br /> Now add 2 GLOBAL phrases: $vbphrase[adv_latest_journalentries] = "Latest Journal Entries" $vbphrase[adv_no_entries] = "No Journal Entries" Then create a new module: Module Title: Journal Latest Entries File to include: journalentries.php Active: yes... -.-' Column: right|left Templates Used: adv_portal_latestjournalentry, journal_latestentrybits Have fun and don't forget to :-) UPDATE (10/17/2004): - added 2 modified version of 'journal_latestentrybits' for right|left or center block (thanx to Billbensen for center version) - see attachments [ billbensen__centered_block.txt] - Valentino Rossi Wins! :devious: UPDATE (10/20/2004): - patched template collapse id, please change your old template with new version. (thx to memobug for debugging) thx to AN-net for his Journal hack Brahm for the vBindex version of this module. Billbensen for modified version of journal_latestentrybits template Show Your Support
|
Comments |
#22
|
|||
|
|||
Would it be possible to take only the most recent entry per journalist to avoid someone spamming the latest entries, so to speak? It seems like it should be possible with a GROUPing of some type, but the only solutions of this type I found online were sublinked queries that made my head hurt.
Regards, Matt |
#23
|
||||||
|
||||||
Quote:
_______________________________ Quote:
_______________________________ Quote:
Code:
<ol> <li>blah<li> </ol> Quote:
Quote:
But you're right: I will change the title setting also hack version.. _______________________________ Quote:
|
#24
|
||||
|
||||
I'm at lesson now and I can't try...
...but at your own risk try this: Code:
$getlateste= $DB_site->query(" SELECT journal_entries.entrytitle,journal_entries.entrydate, journal_entries.entry_id,journal_entries.entrytext, journal_entries.journal_id,journals.journalist,journals.journalist_id FROM ".TABLE_PREFIX."journal_entries AS journal_entries LEFT JOIN ".TABLE_PREFIX."journals AS journals ON (journal_entries.journal_id=journals.journal_id) GROUP BY journal_entries.journal_id WHERE journal_entries.entry_active=1 AND journal_entries.private!=1 AND journals.private!=1 ORDER BY journal_entries.entrydate DESC LIMIT 5 "); |
#25
|
|||
|
|||
Quote:
Bill Bensen |
#26
|
||||
|
||||
In fact! ;-)
|
#27
|
|||
|
|||
The typo is from the original mod for vbindex. Both Bolas and I overlooked it. I think the strip slashes is a nice bit that was missed as well.
This hack is for [vB 3.0.3] - vB Journal for vBulletin 3.0.3(v1.0.0) and [vB 3.0.3] - vB Journal | vba CMPS module: latest entries Below is the more blog like version of Bolas' mod. I am working on the RSS portion of this to make it even more "blog like". The entry title is 50 chars and the body of the entry is 150 chars and then the "more..." link to the entry. Please note that this only shows the first jounalists' entries. On my site I only wanted my entries to appear on the front page. :glasses: You can change that by modifying the WHERE portion of the query "journals.journalist_id = 1" to whatever ID you wish to display or by removing it. touch /path_to_your_forum_dir/modules/journalentries.php PHP Code:
then create template 'adv_portal_latestjournalentry' HTML Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> <thead> <tr> <td class="tcat"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('cmps_pagesmenu')"><img id="collapseimg_cmps_pagesmenu" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_cmps_pagesmenu].gif" alt="" border="0" /></a> <span class="smallfont"><strong>$vbphrase[adv_latest_journalentries]</strong></span> </td> </tr> </thead> <tbody id="collapseobj_cmps_pagesmenu" style="$vbcollapse[collapseobj_cmps_pagesmenu];text-align:$stylevar[left]"> $latestentrybits </tbody> </table> <br /> Modify the journal_latestentrybits HTML Code:
<tr> <td class="$bgclass"><div class="smallfont">$latestentrydate </br><a href="$vboptions[bburl]/journal.php?do=showentry&e=$latest[entry_id]" ><b>$latest[entrytitle]</b></a> <br /></div></td> <tr><td class="$bgclass"><blockquote><div class="smallfont">$latest[entrytext]</div></blockquote><span style="cursor:pointer" onclick="window.open('member.php?u=$latest[journalist_id]')">Posted by: $latest[journalist] </span>at <span class="time">$latestentrytime</span> ($latest[commentcount] comments)</td></tr> </tr> $vbphrase[adv_latest_journalentries] = "Latest Journal Entries" $vbphrase[adv_no_entries] = "No Journal Entries" Then create a new module: Module Title: Journal Latest Entries File to include: journalentries.php Active: yes Column: center Templates Used: adv_portal_latestjournalentry, journal_latestentrybits Live example towards the bottom of the page. Surf this... photography This also displays the number of comments next to the author and the time the entry was added. Bill Bensen |
#28
|
||||
|
||||
Good work!
If you want another example of the same Bilbensen modification to Bolas CMPS conversion of the Brahm's vBindex Add-On (please, we need another '..ation' to become the longest hackname of this forum ) you can go to http://www.wellage.net In my main page I used Billbensen mod to have a preview on the right side instead of a center block. |
#29
|
|||
|
|||
Bolas, unrelated to this hack, there is a problem with your rollup code. The Journal button rolls up another ON FOCUS module. I had this problem and found I had to use unique names in five places (wherever you have ...cmps_pagesmenu substitute ...cmps_pagesjournal) in your journal template, I believe there are 5 occurrences) I can't guarantee that is the CORRECT solution, but that is what I did (give each module a unique cmps_pagesNAME) and the rollups worked independently.
Regards, Matt |
#30
|
||||
|
||||
oh... deh...
It was so..ehm... funny! Thank you, I will correct it ASAP! |
#31
|
||||
|
||||
done.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|