Results 1 to 12 of 12

Thread: Calling files in a plugin

  1. #1
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default Calling files in a plugin

    I'm trying to create a plugin from what was a mod before. The mod has two files that it needs to run correctly... Example :

    block.file_one.html
    block.file_two.html

    Then you output the data by saying

    <%block_file_three title="" max_item="6" listing_type="sponsored_premium" template="block.file_one.html" template_rows="block.file_three.html"%>

    What I'm not sure about is how to call file_one and file_two.
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  2. #2
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    Im not 100% sure what it is your wanting, but I guess you want to convert a block to a plugin?
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  3. #3
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Yep!
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    You might be best off waiting for Nakos to give you an answer on this one.

  5. #5
    Join Date
    Nov 2007
    Posts
    227

    Default

    I am not sure what you want either, but does this help you?

    Code:
    $file2 = file_get_contents($indexu->config['plugin_path'] .'/plugin_name/template/file2.html');
    $file3 = file_get_contents($indexu->config['plugin_path'] .'/plugin_name/template/file3.html');
    
    $tpl->assign("file2",$file2);
    $tpl->assign("file3",$file3);
    
    $plug->SetHtmlHook(whatever_hook_you_want, file_get_contents($indexu->config['plugin_path'] .'/plugin_name/template/file1.html.html'));
    Hopefully you can figure that mess that I wrote. I will have more time to help in the morning when I get off work.

    Regards
    mp
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  6. #6
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Unhappy End of the block ?

    Yep!


    Dont take this the wrong way but why re-invent the wheel?

    FSGDAG do you see the time when indexu will neither need a block system?

    Do you think or would want the plugin system to take over for blocks completely?
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  7. #7
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I could picture the blocks being plugins, but they would still be blocks. And they would be plugins so you don't need to edit pages to enable/disable them. Of course to change anything in them you would still edit the block.

  8. #8
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Thats basically what my thinking was... With it being a plugin your not constrained as much as if it was a MOD. Would it be good if IndexU could go completely MODless and everything a plugin... Hell yes! LOL But I'm not sure that will happen. But at this point my rule of thumb is, the more plugins and less MODs the better!
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  9. #9
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    I dont consider blocks as mods. Blocks are blocks

    Unless you can have the block php and html packaged in an plugin directory as opposed to the block directorys, you have still got to remember to backup them to.

    Also I think in the backend plugins could be grouped under expandible folders depending there group.
    Personally I think the plugin area is quite disorganised, if people were thinking of adding block plugins (or Blockins ) it would be hard to find each one and you'll probally have a page as long as your arm.
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  10. #10
    Join Date
    Nov 2007
    Posts
    227

    Default

    I agree with echo, somewhat. I think there should be a system similar to the plugin system where you can install and uninstall blocks without editing a file, like installing and uninstalling a plugin. And, cusom blocks ccould be made and uploaded to the blocks directory.

    I like the idea FSGDAG has about making a block a plugin. It is the solution for now. That way you can turn them on and off at will. You can make a block a plugin though and it will work just fine.

    Hopefully I worded that all O.K.

    Regards
    mp
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  11. #11
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Give us time, perhaps we'll convert all blocks to plugins AND find a way to organize them better.

  12. #12
    Join Date
    Aug 2008
    Posts
    49

    Default

    hello,

    i think you dont need to make blocks, because you could make a function or mod or block in a plugin.

    you could call other files from plugin.

Similar Threads

  1. Do you use the VB plugin?
    By Bruceper in forum Customers Lounge
    Replies: 16
    Last Post: 03-13-2009, 12:47 AM
  2. Need help with new plugin
    By mpdaddy in forum Plugins
    Replies: 10
    Last Post: 02-04-2009, 04:00 AM
  3. Plugin HELP
    By Rockyuk in forum INDEXU DELUXE v1.x
    Replies: 3
    Last Post: 01-01-2009, 11:59 AM
  4. RSS Feed Plugin
    By FSGDAG in forum Plugins
    Replies: 0
    Last Post: 12-18-2008, 10:58 AM
  5. css files
    By Millards in forum Blocks and Modification
    Replies: 18
    Last Post: 05-05-2008, 01:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •