Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Running multiple instances of the Reviews Module
  • Posted: 20.12.2002, 01:00
     
    Raleigh
    registered:
     June 2002
    Status:
    offline
    last visit:
    06.08.05
    Posts:
    572
    I've seen several requests to run multiple instances of the core Reviews module. I understand that several people are working on different reviews modules that will be much more functional than this minor hack but if anyone has a pressing need in the meantime to run multiple instances of Reviews feel free to use this. I'm not providing any support on this; I am not the author of the module, all credit goes to the original author and the core dev team, this hack is simply the result of copying, pasting, searching and replacing stuff that they wrote.

    After sending the user this solution, he then asked about the possiblity of running a third instance of the Reviews module and here's the email I sent him with the instructions:

    To hack your reviews module so that you can run more than one reviews section on your site, follow the following steps (In this case, we will assume that we are going to call this third module 'teviews' and we will work with the Seviews files that I sent you):

    1) Make a copy of your Seviews

    2) paste it somewhere else and change the name of the directory to 'Teviews'

    3) open up the SQL file that I sent you and do a search and replace. Replace every instance of "Seviews" with "Teviews" and every instance of "seviews" with "teviews" (case sensitive). save the new SQL file.

    4) open up each of the admin.php, index.php, and version.php files in your Teviews directory and do the same case sensitive find and replace. Save each of the files.

    5) Open up the global.php file located in the Teviews/lang/eng directory. Replace every instance of "SEVIEW" with "TEVIEW" (case sensitive, again-This should change only the defines themselves and should keep the English definition looking normal, e.g., your visitors to your site won't see, "Click here to write a Teview") Save the file.

    6) Open up the pntables.php. Copy lines 518 - 560 (you will see that that's the stuff that apppears in my between my comments - The first comment is "//This is the part I added for a second reviews section. djbt" Paste that section in notepad, or whatever you use for an editor. Replace all instances of "seviews" with "teviews" (This is all lower case so you don't have to do the case sensitive find and replace). Copy the results and paste them back into pntables.php (I would recommend adding your comments in there, just so you can find your sections if you ever upgrade your PostNuke and need to add that stuff back in there.) Save the pntables.php file.

    7) You're all done now, you can load up the SQL file and your module and test it out. You can repeat this as many times as you want. Just call it something different each time, and don't name it the same as any other modules.

    Good luck and happy reviewing!
    -Raleigh, pnCorps[/b]
  • Posted: 22.12.2002, 18:04
     
    jfj
    rank:
    Freshman Freshman
    registered:
     October 2002
    Status:
    offline
    last visit:
    14.07.05
    Posts:
    7
    Can this (or similar) solution also be used to create a second instance of the Downloads module (I´m running Post Nuke 0.7.0)

    Thank you,
    Jóna Finndís
  • Posted: 22.12.2002, 18:58
     
    AlanA
    registered:
     June 2002
    Status:
    offline
    last visit:
    17.05.04
    Posts:
    271
    Yes it should work for any of the modules, except ones like news you probably won't want to do this for.
  • Posted: 22.12.2002, 21:25
     
    jfj
    rank:
    Freshman Freshman
    registered:
     October 2002
    Status:
    offline
    last visit:
    14.07.05
    Posts:
    7
    I was trying to make a second instance of the Downloads module but now I may have interrupted the site substancially...

    icon_redface

    I get the following warning message when trying to download from the orginal downloads module

    Warning: Cannot add header information - headers already sent by (output started at ...

    I replaced the pntables.php with the original version again but the problem remains... Any good advices?

    -->I figured it out, I had to delete a space at the end of the pntables.php

    Jóna Finndís
  • Posted: 23.12.2002, 01:13
     
    Raleigh
    registered:
     June 2002
    Status:
    offline
    last visit:
    06.08.05
    Posts:
    572

    jfj

    Can this (or similar) solution also be used to create a second instance of the Downloads module (I´m running Post Nuke 0.7.0)

    Thank you,
    Jóna Finndís


    Sure... you would have to look into the files to see exactly how the downloads is written, extract the SQL from the original SQL file that comes with the install, etc.... but you might want to just use the categories and subcategories features that are built into the downloads module.
  • Posted: 24.05.2003, 20:46
     
    dayboy2k1
    rank:
    Freshman Freshman
    registered:
     May 2003
    Status:
    offline
    last visit:
    02.07.03
    Posts:
    6
    I'm interested in doing this on my site but the link does not work. Could you please put this somewhere else or e-mail it to me at dayboy2k1@hotmail.com please.
  • Posted: 25.05.2003, 00:25
     
    Raleigh
    registered:
     June 2002
    Status:
    offline
    last visit:
    06.08.05
    Posts:
    572
    Sorry about that... I had switched servers after some problems with my old host and didn't upload everything. The link should work now and I **THINK** I put the most updated version of that on there, but let me know if you run into any problems.
  • Posted: 25.05.2003, 00:41
     
    dayboy2k1
    rank:
    Freshman Freshman
    registered:
     May 2003
    Status:
    offline
    last visit:
    02.07.03
    Posts:
    6
    Works now, thanks a lot

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula