![]() |
|
#1
|
|||
|
|||
|
What it does.
This module provides the ability to display a directory of "articles" using VB threads/posts as the article source. Articles may also be displayed via the directory capability or directly as indicated below. This means anything that can be placed into a post can be used as an article. Articles may be accessed in one of 2 ways. 1. Directly by post id. To display post number 31982 use /index.php?page=article&p=319822. Directly by thread id. To display the first post in a thread use /index.php?page=article&t=5117It is possible to display the 'n'th post in a thread as a page. The page order is based on the post id. To display the 5th page use /index.php?page=article&t=5117&p=5The thread title will be used as the name of the page except when displaying a specific post or page number. In that case the post title will be used if one exists. This works well in the case where a thread is set up with multiple chapters. If the requested entity can't be found the page will be empty. To display a directory of articles for forum id 37 use /index.php?page=article&f=37&dirAvailable options are 'dir=recent' for the 'n' most recent articles and 'dir=popular' for the 'n' articles with the most views. These choices are provided automatically when doing a directory listing. . Also available is 'dir=author' which results in articles being displayed sorted by author and title. View counts are updated when articles are referenced directly by postid as in #1 above or when accessed only by threadid only as in #2 above. This means once a user is reading a multi-page article the view count won't keep increasing. When accessing articles via the thread id navigation links will be automatically provided at the bottom of the article. This will allow a user to easily read through a multi-chapter article. Also supported is the ability for the breadcrumb information to reflect the actual page name instead of the generic page name. For this feature to work properly the vba_cmps_include_bottom.php must be modified by moving a section of code. If you don't wish to use the feature simply delete or comment the code that is clearly marked (begin-end) near the end of the article.php file. What it doesn't do. This isn't intended to replace a full-blown articles system. However for users that only need the basics then this should work fine. The advantage for this module is that no additional hacking of VB is necessary to make things work. How would I use it? One way to use this could be for multi-page help system, news items or articles. As one example, the thread title could be "My Summer Vacation" and the post titles could be the chapter names. Pages may consist of any content you can fit into a VB post, including inline images. Installation Installation is straight forward. Simply download and follow the "article installation.txt" file. The other file that is needed is the article.php file. This file needs to be installed in the modules directory. The article.php file will check forum permissions if the $checkperms variable is set to true. If the user does not have permission to view the forum where the article is contained then it will not be displayed. Turning this 'off' allows the module to process forums where the user doesn't normally have access - but still needs to see the content via the front-end display. Using the system. Using the system is pretty simple. Create a thread/post. You may use a separate forum with restricted permissions if desired. The first attached image will be used as the article icon at the top of the article display. There are currently no provisions for accessing more than one attached image. When referencing an article via the thread id additional navigation links will be automatically provided at the bottom of the article if there are additional pages to be displayed. Dealing with Permissions If the variable $checkperms is set to 'true' then users will be provided an error message if they do not have sufficient permission to view the Articles forum. However, if $checkperms is set to 'false' then users will be able to read articles regardless of the forum permissions. Users must have explicit permission to access attachments. Setting $checkperms to 'false' does not remove this restriction. UPDATES 23-Feb-2005
CAVEAT: For the paging system to work you must change the CMPS default Page Variable from 'page' to something other than 'page'. A good choice would seem to be 'pg' as the rest of VB doesn't seem to make use of it. This is necessary as the vb page navigation makes use of the 'page' argument internally so it's not possible to have it the same. Anything can be used in its place as the templates and application are dynamically driven. If you have any other modules that are hard coded they may be changed by substituting the value of $vb_options['portal_pagevar'] instead of 'page'. 24-Feb-2005
26-Feb-2005
1-Mar-2005
3-Mar-2005
30-Mar-2005 Upgraded to make more flexible when dealing the article icons.
To upgrade from a previous release simply replace the article.php file and set the new configuration paramters to your desired settings. 5-Apr-2005
To upgrade from a previous release replace the article.php file and set the new configuration paramters to your desired settings. It is also necessary to update/replace the adv_portal_article template to make use of the article navigation links. 18-Apr-2005
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. Last edited by Tom M; 04-18-2005 at 04:19 PM. Reason: Updated: Loaded most recent version |
|
#2
|
|||
|
|||
|
Nice, simple, but two things.
No main menu? Guess we would have to link it by hand Other though, only one image attachment shows, any others do not, and kind of need that as a lot of my articles have several screenshots. One thing I did notice, loads VERY fast, so nice job. If you can tell me how to have my attachments displayed, appreicate it |
|
#3
|
|||
|
|||
|
I'm actually working on the next release now which will provide a directory capability. Simply define a forum to be the article repository and a directory will be provided. The step after that is to decide how to best handle categories.
Attachments are another issue. I need to give some thought on what's the best way to handle them. Inline images are no problem btw.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#4
|
|||
|
|||
|
Cool, that's nice news. I'm looking at the new geek articles, and my eyes glazed over soon as I saw the amount of hacks needed. yow...
I did notice something though. I have a couple links in my Navbit to new threads, and view your posts. I noticed that the link changed with this, on every page but this article, to point properly (I have my forums in a subdirectory) but with pages generated with this, it removes the "forum" link, and ends up causing a error page. So instead of http://www.shivasite.com/forums/search.php?do=getnew I get http://www.shivasite.com/search.php?do=getnew just when I use your script. Sample page: http://www.shivasite.com/index.php?page=article&t=894 Update: just checked, all my page links that would normally go to the forum folder go to the root instead, including the quick links drop down. Any Ideas? |
|
#5
|
|||
|
|||
|
Did you do the edit of vba_cmps_include_bottom.php as described in the install file?
BTW - I've got thumbnails working and should be able to upload the new package in the next 12 hours or so.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#6
|
||||
|
||||
|
I'll use this too
![]() should I wait for the new one ? Last edited by Deviant++; 02-19-2005 at 10:38 AM. |
|
#7
|
|||
|
|||
|
I have uploaded the new files to the first post.
The new files provide capability to generate 3 styles of directory listings (Complete, Most Popular, and Most Recent) and display articles along with all attachments the article may have. I'm wouldn't be surprised if there may be one or 2 (or more) problems even though I did test it fairly well. Give it a try and let me know how it goes.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#8
|
||||
|
||||
|
http://forums.deviatedhq.com/index.p...e=article&t=53
Errors : 1. Had to set the permissions to false cause otherwise it wasn't letting me see the article. 2. The 1st attached image isn't showing up as a picture. 3. The directory listing dosn't seem to be working.. |
|
#9
|
|||
|
|||
|
Thanks for the feedback. Did you get a "No permissions" error page?
1. What permissions do you have set on the forum? 2. Same thing. If you don't have permission to view attachments then you won't see the attached pictures. 3. A bit more info than "not working" is needed . If you don't have permission to see the forum then you won't be a ble to get a directory listing.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#10
|
||||
|
||||
|
all permissions are go for admin, and even the admin ( me ) couldn't read when it was set to true..
permission for admin is 'go' to everything as in total control.. and I'm the admin.. and the not working thing, umm, well I'm putting in dir=recent, or any other variant, it's just a blank page. |
|
#11
|
|||
|
|||
|
Very odd. I have it running semi-live on my site and it works fine with permissions being checked. Isn't that always the case
![]() With permissions being checked do you get an error screen? Can you send me a link so I can take a look? Feel free to pm me if you prefer. |
|
#12
|
||||
|
||||
|
it says u do not have permission to access, plus the attached image also didn't show up when I disabled permissions ( also admin account as go for everything, no 'no's to any permissions anywhere in acp )
|
|
#13
|
||||
|
||||
|
ok looks like I got the 'dir' working and that solved the permissions page
this is what I have right now $checkperms = false; // Set $articleforum to the forumid where your articles are stored. // This is only used for the directory listing. $articleforum = 34; Probs: 1. the image isn't showing up ( attachment as the upper left pic ) ( coming as a red x ) eg normal: http://forums.deviatedhq.com/showthread.php?t=53 article: http://forums.deviatedhq.com/index.p...e=article&t=53 2. The pages keep dont end, they flow into another 'frumdisplay' eg =3 ( not in article format, normal posting one ) 3. I'm gonna be using different forums as my articles forums, not one. Is there anyway the dir can be made to show dynamic in url rather than changing code for 'one' forum in the php file. Great hack though I'm gonna love using it, I'm sure it'll be much more spider friendly too. Suggestions : display thread rating on article rating and ability to rate while viewing it as an article too. |
|
#14
|
|||
|
|||
|
The directory forumid could be made as a command line argument.
OTOH - if you just want to pull the directory for multiple forums changing PHP Code:
PHP Code:
PHP Code:
PHP Code:
To make it settable via the command line would take a bit more coding change.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#15
|
||||
|
||||
|
im testing but itm, if all the dir's appear in the same window, it'll mix up category / subjects..
|
|
#16
|
|||
|
|||
|
I've uploaded a new article.php which might (should?) take care of you missing thumbnail. If not I'll work on it some more tonight. Gotta go.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#17
|
||||
|
||||
|
*just read ur new post, I wrote this before I read about the new file, I'll try i now.
http://forums.deviatedhq.com/index.php?page=article&dir Parse error: parse error, unexpected ',' in C:\Inetpub\vhosts\deviatedhq.com\subdomains\forums\httpdocs\modules\article.php on line 78 code is: $checkperms = true; // Set $articleforum to the forumid where your articles are stored. // This is only used for the directory listing. $articleforum = 35,41; // See if the user can access the forum at all $articleperms = fetch_permissions($articleforum); if ($checkperms AND !($articleperms & CANVIEW)) print_no_permission(); // Set $dateformat to your preferred date layout $dateformat = "M d, Y"; unset($sqlquery, $sqltype); $displaypage = 1; if (isset($_REQUEST['dir'])) { // generate a directory listing $sqltype = 'dir'; $sqlquery = "SELECT threadid FROM " . TABLE_PREFIX . "thread AS thread $deljoin WHERE forumid IN ($articleforum) AND visible = 1"; |
|
#18
|
||||
|
||||
|
Quote:
nope, it might be the dimensions..? |
|
#19
|
|||
|
|||
|
When using the multiple forumid variation it's necessary to enclose the numbers with quotes (i.e. $articleforum = "35,41"; ).
No matter. I just updated the article.php file with a version that supports specifying the forumid. If specified then that forum will be scanned. If not specified then the default forum will be scanned. Simply add the '&f=35' to the directory request to get a directory listing of forum #35. As far as the thumbnails go, if you are seeing the images as attachments when viewing as normal posts then you should see them in the article posting as the module uses the same postbit code to generate the attachment portion of the article.
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
|
#20
|
|||
|
|||
|
Ah. I think I figured it out. My guess is that you don't have thumbnails enabled. It's the thumbnail that's used for the image in the header portion and in the directory listing.
I've uploaded a version that checks to see if thumbnails are enabled and if they aren't then it uses a blank image. Give it a try and see if it fixes your situation. Of course you could also enable thumbnails .
__________________
Tom Morris Porsche Boxster discussion forum. Today's Conservative discussion forum. |
| 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 |
| v3Article Module - Last 10 Articles | maximux1 | Add-On Modules & Modifications | 69 | 06-06-2005 03:36 PM |
| [request] most read articles | ttnb | Add-On Modules & Modifications | 7 | 11-17-2004 07:02 AM |
| VBA Articles? | tfw2005 | Site Feedback & Updates | 9 | 10-14-2004 02:51 PM |
| Wrap CMPS modules around V3 Articles? | tfw2005 | Troubleshooting / "How do I..." Questions | 4 | 08-27-2004 04:55 PM |
| cmps_index.php and articles.php | RSimpson | Troubleshooting / "How do I..." Questions | 6 | 06-06-2004 03:40 PM |