Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Feedback
  3. [MOD]CSV Import

[MOD]CSV Import

Scheduled Pinned Locked Moved Feedback
1 Posts 1 Posters 88 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    T
    Thomas
    wrote on last edited by
    #1

    Edit fop2/lib/dbgrid.php

    Find:

    private $allow_export=true;
    

    Add under:

    private $allow_import=true;
    

    Find:

    if ($this->allow_export) {
                $req=$this->set_request('dbgrid_action','csv',false);
                if($sep==1) { $buttons.=" <div class='btnseparator'></div>"; }
    
                $buttons.="
                        <div class='fbutton'>
                            <span class='tbImgLink icon_export'>&nbsp;</span>
                            <span class='btnText' onclick='javascript:location=\"".SELF.$req."\"'>".trans('Export')."</span>
                        </div>
                ";
                $sep=1;
            }
    

    Add Above:

    if ($this->allow_import) {
                $req=$this->set_request('dbgrid_action','csv',false);
                if($sep==1) { $buttons.=" <div class='btnseparator'></div>"; }
    
                $buttons.="
                        <div class='fbutton'>
                            <span class='tbImgLink icon_export'>&nbsp;</span>
                            <span class='btnText' onclick='javascript:location=\"import.php\"'>".trans('Import')."</span>
                        </div>
                ";
                $sep=1;
            }
    

    Save and upload

    Upload import.php to the fop2 root dir
    Upload output.sql to the fop2 root dir and CHMOD 777
    Update phonebook.csv with your names, numbers, etc etc and upload to fop2 root dir

    Login to fop2 and click Visual Phonebook then import and all should be done.

    [url=http://domain1647423.sites.fasthosts.com/csvimport.zip:fypvwofn]Download Files[/url:fypvwofn]

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups