/* This file is part of Bolixo. Bolixo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bolixo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bolixo. If not, see . */ #include #include #include #include #include "trlitool.h" #include "../bolixo.h" #include "../instrument.h" #include "../proto/bolixod_client.protoch" #include #include #include #include "../bolixo.m" #include #include "util.h" extern void bolixo_doc (DOCUMENT_POINTER &, DOC_ID &jump, const char *username, bool display_full, bool index); extern void bolixo_doc_fr (DOCUMENT_POINTER &, DOC_ID &jump, const char *username, bool display_full, bool index); string util_readsecret(); void util_defstyles(); static W_SSTRING w_user("user"); static W_SSTRING w_fullname("fullname"); static W_SSTRING w_address("address"); static W_SSTRING w_city("city"); static W_SSTRING w_state("state"); static W_SSTRING w_country("country"); static W_SSTRING w_interest("interest"); static W_SSTRING w_node("node"); static W_SSTRING w_file("file"); static W_UNSIGNED w_offset("offset"); static W_SSTRING w_email("email"); static W_SSTRING w_nickname("nickname"); extern "C" void tlmp_initmod() { translat_load ("bolixo"); } static bool f(const char *s) { return s[0] != '\0'; } static void bolixo_script() { document.onreadystatechange = function () { var state = document.readyState; if (state == 'interactive') { fixsize(); } else if (state == 'complete') { } }; function fitcol(divs){ var maxwidth = 0; if (divs != null){ for (var i=0; i top_b.width) top.style.width = tb_b.width; } } var top = document.getElementById("top"); var middle = document.getElementById("middle"); var search = document.getElementById("search"); if (top != null && middle != null && search != null){ top_b = top.getBoundingClientRect(); var middle_b = middle.getBoundingClientRect(); search.style.height = window.innerHeight-top_b.height-middle_b.height-30; }else if (top != null && search != null){ top_b = top.getBoundingClientRect(); search.style.height = window.innerHeight-top_b.height-40; } } function formsubmit(href){ window.location.href = href; } \n"); DIV t; t.dispflex().flowrow().style("background-image","linear-gradient(to right, #ff6666 , yellow)").print(); DIV tt; tt.flexgrow().marginauto().disp("inline-block").textalign("center").print(); if (!tlmpweb_ismobile()){ /-
htmlout (MSG_R(T_BOLIXO_ORG_DIR)); /-
} tt.end(); tt.flexfixe().sfloat("right").print(); DIV dt; dt.dispflex().flowcol().print(); bolixo_url (called_from_step,1,MSG_U(I_BOLIXOHOME,"Home page")); bolixo_url (called_from_step,5,MSG_U(I_ABOUTBOLIXO,"What is Bolixo ?")); bolixo_url (called_from_step,8,MSG_U(I_BACKTOSEARCH,"Search")); } extern W_UNSIGNED w_robot; static void webmain_real() { glocal CONNECT_INFO con; glocal.con.port = "/dev/bolixod.sock"; glocal.con.secret = util_readsecret(); (); if (tlmpweb_isrobot() || w_robot == 1){ w_robot = 1; step=6; } bolixo_script(); // Home tlmpweb_title (MSG_U(T_BOLIXO_ORG_DIR,"Bolixo.org directory")); util_defstyles(); tlmpweb_body ("white",NULL,"background=background.png"); DIV v; v.dispflex().flowcol().print(); DIV b("","top"); b.print(); bolixo_title(1); b.end(); b.autoscroll(); if (tlmpweb_ismobile()){ b.id("middle").marginauto().w(100).h(100).bg("lightblue").paddings(10,10).vpaddings(10,10).vmargins(20,20).print(); }else{ b.id("middle").marginauto().w(60).h(85).bg("lightblue").paddings(10,10).vpaddings(10,10).vmargins(20,20).borderradius(20).border(1,"black").print(); }
Welcome

Already have an account, just Log in

Why Bolixo ?

Bolixo is a distributed social media. Bolixo is free software.

Looking for a social media respecting your privacy ? Tired of fake news ?
Tired of being harassed by sites, suggesting new friends every day ?
Want to create your own media site for your organization ? Connected will the Bolixo network ?
Exchange with friends, create work groups, share documents and messages ?
Follow what is going on in the world ?
Contribute to what is going on in the world ?
Publish your latest ideas to the world on your public page ?

Give Bolixo a spin. Invite a friend.
It is free and will remain free forever. Just create an account now

On desktop or mobile

?> if (strcmp(tlmpweb_getlang(),"fr")==0){ util_clickable_img ("/main-fr.jpg","40%",1); /-   util_clickable_img ("/talk-fr.jpg","40%",1); /-   util_clickable_img ("/talk2-fr.jpg","15%",1); }else{ util_clickable_img ("/main.jpg","40%",1); /-   util_clickable_img ("/talk.jpg","40%",1); /-   util_clickable_img ("/talk2.jpg","15%",1); } // Search tlmpweb_title (MSG_R(T_BOLIXO_ORG_DIR)); util_defstyles(); tlmpweb_body ("white",NULL,"background=background.png"); DIV v; v.dispflex().flowcol().print(); DIV b("","top"); b.print(); bolixo_title(8); b.end(); b.id("middle").marginauto().print(); ("filter"); const char *fsize = tlmpweb_ismobile() ? "size=10" : "size=15"; DIV d("x","topform"); d.borderradius(5).border(1,"lightgray").bg("lightgray").disp("inline-block").vmargins(5,5).print(); /-

/-#I_LOOKINGFOR Looking for someone ? /-
/- htmlprintf ("
%s%s%s\n",MSG_U(H_USER,"User"),MSG_U(H_FULLNAME,"Full name"),MSG_U(H_ADDRESS,"Address")); /-
field_string (w_user,fsize); /- field_string (w_fullname,fsize); /- field_string (w_address,fsize); htmlprintf ("
%s%s%s\n",MSG_U(H_CITY,"City"),MSG_U(H_STATE,"State"),MSG_U(H_COUNTRY,"Country")); /-
field_string (w_city,fsize); /- field_string (w_state,fsize); /- field_string (w_country,fsize); htmlprintf ("
%s\n",MSG_U(H_INTERESTS,"Interests")); /-
field_string (w_interest,fsize); /- button_submit (MSG_U(B_SEARCH,"Search")); /-
return true; keepediting = true;
b.end(); // /-
FILTER filter; filter.user = w_user.c_str(); filter.fullname = w_fullname.c_str(); filter.address = w_address.c_str(); filter.city = w_city.c_str(); filter.state = w_state.c_str(); filter.country = w_country.c_str(); filter.interest = w_interest.c_str(); (glocal.con,filter,w_offset,10); bool is_mobile = tlmpweb_ismobile(); if (!success){ /-

DIV d; d.bg("white").border(1,"black").marginauto().w(is_mobile ? 90 : 30).paddings(5,5).vpaddings(5,5).borderradius(5).print(); htmlprintf ("

%s
\n",MSG_U(E_NOFILTER,"No filter specified")); /-

  • Empty fields do not participate in the search.
  • Records matching all non-empty fields will be shown (logical and).
  • A field may contain the complete value you are looking for or just a subset. For example, the following entries will all match the word "Montreal".
    • montreal
    • mont
    • ontrea
    • real
  • The search is case insensitive.
?> }else{ DIV d("","search"); if (is_mobile){ d.w(100).vpaddings(5,0).vmargins(10,0).bg("white").autoscroll().print(); }else{ d.w(90).vpaddings(5,5).marginauto().vmargins(10,0).bg("white").border(1,"black").borderradius(5).autoscroll().print(); } //is_mobile = true; /- bolixo_prevnext(users.size()==10); for (auto &u:users){ if (is_mobile){ /-
}else{ /-
} DIV info; if (!is_mobile) info.dispflex().flowrow().print(); { const char *nodename = u.nodename; if (strncasecmp(nodename,"https://",8)==0){ nodename += 8; }else if (strncasecmp(nodename,"http://",7)==0){ nodename += 7; } DIV d("col0"); d.margins(5,5).borderradius(5).border(1,"gray").print(); htmlprintf ("%s@%s
%s
\n",u.user,nodename,u.fullname); if (u.photo) htmlprintf ("\n",tlmpweb_curpage(),u.user,u.nodename); if (u.mini_photo) htmlprintf ("\n",tlmpweb_curpage(),u.user,u.nodename); } if (f(u.address1) || f(u.address2) || f(u.city) || f(u.state) || f(u.country) || f(u.zipcode)){ DIV d("col1"); d.bg("lightblue").margins(2,2).paddings(4,4).borderradius(5).border(1,"gray").print(); htmlprintf ("%s
\n",u.address1); htmlprintf ("%s
\n",u.address2); htmlprintf ("%s%s %s
\n",u.city ,u.city[0] !='\0' && u.state[0] != '\0' ? "," : "" ,u.state); htmlprintf ("%s%s %s
\n",u.country ,u.country[0] !='\0' && u.zipcode[0] != '\0' ? "," : "" ,u.zipcode); } if (f(u.email) || f(u.phone) || f(u.fax) || f(u.bolixosite) || f(u.website)){ if (is_mobile) htmlout ("
\n"); DIV d("col2"); d.bg("lightblue").margins(2,2).paddings(2,2).borderradius(5).border(1,"gray").print(); /- if (f(u.email)) htmlprintf ("
%s%s\n",MSG_R(F_EMAIL),u.email); if (f(u.phone)) htmlprintf ("
%s%s\n",MSG_R(F_PHONE),u.phone); if (f(u.fax)) htmlprintf ("
%s%s\n",MSG_R(F_FAX),u.fax); if (f(u.bolixosite)){ htmlprintf ("
%s",MSG_U(F_BOLIXOSITE,"Bolixo site")); util_print_span (u.bolixosite); } if (f(u.website)){ htmlprintf ("
%s",MSG_R(F_WEBSITE)); util_print_span (u.website); } /-
} if (is_mobile) htmlout ("
\n"); if (f(u.interest)){ DIV d("col3"); d.bg("lightgray").margins(2,2).paddings(4,4).borderradius(5).border(1,"gray").print(); htmlout (util_format_shortmsg(u.interest,100)); } } bolixo_prevnext(users.size()==10); } /-
// /-
(glocal.con,w_node.c_str(),w_user.c_str(),w_file.c_str()); if (!success){ tlmpweb_title ("Error"); htmlprintf ("msg=%s
\n",msg); htmlprintf ("node=%s
\n",w_node.c_str()); htmlprintf ("user=%s
\n",w_user.c_str()); htmlprintf ("file=%s
\n",w_file.c_str()); }else{ tlmpweb_setmodified(modified); tlmpweb_doctype ("image/jpeg",content.getsize()); htmlwrite (content.getbuffer(),content.getsize()); }
noend();
// login tlmpweb_title (MSG_R(T_BOLIXO_ORG_DIR)); tlmpweb_body ("white",NULL,"background=background.png"); bolixo_title(3); DIV d; d.w(tlmpweb_ismobile() ? 90 : 50).marginauto().vmargins(100,0).vpaddings(10,10).paddings(10,10).border(1,"black").bg("#ffefc1").borderradius(5).print(); ("login"); htmlprintf ("
%s
\n",MSG_R(I_LOGIN)); /-

/-#I_REDIRECT Enter your email and you will be redirected to the login page of your Bolixo node. /-

string extra = string_f("style=width:100%% placeholder='%s'",MSG_R(I_EMAIL)); field_string (w_email,extra.c_str()); /-

button_submit(); return true; glocal bool fail = false; (glocal.con,w_email.c_str()); if (!success){ glocal.fail = true; /- * htmlprintf (MSG_U(E_EMAILNOTFOUND,"This email do not correspond to any account")); /-

}else{ htmlprintf ("\n",nodename,w_email.c_str()); glocal.fail = true; } fail = glocal.fail; // Create account tlmpweb_title (MSG_R(T_BOLIXO_ORG_DIR)); tlmpweb_body ("white",NULL,"background=background.png"); bolixo_title(4); DIV d; d.w(tlmpweb_ismobile() ? 90 : 50).marginauto().vmargins(100,0).vpaddings(10,10).paddings(10,10).border(1,"black").borderradius(5).bg("#ffefc1").print(); ("create"); htmlprintf ("

%s
\n",MSG_R(I_CREATEACCT)); /-

/-#I_SELECTNICKNAME Select a nickname you like and an available node will be found. /-

string extra = string_f("style=width:100%% placeholder='%s'",MSG_R(I_NICKNAME)); field_string (w_nickname,extra.c_str()); /-

button_submit(); return true; glocal bool fail = false; (glocal.con,w_nickname.c_str()); if (!success){ glocal.fail = true; /- * htmlprintf (MSG_U(E_NICKNAMEUSED,"The nickname is already in all nodes")); /-

}else{ //htmlprintf ("Click\n",nodename,w_nickname.c_str()); htmlprintf ("\n",nodename,w_nickname.c_str()); glocal.fail = true; } fail = glocal.fail; // Introduction tlmpweb_title (MSG_R(T_BOLIXO_ORG_DIR)); tlmpweb_body ("white",NULL,"background=background.png"); bolixo_title(5); DIV d; d.w(tlmpweb_ismobile() ? 90 : 50).marginauto().vmargins(30,0).vpaddings(10,10).paddings(10,10).border(1,"black").borderradius(5).bg("white").print(); Bolixo is made of several nodes (or servers) each hosting end users.

  • End users can communicate and collaborate with users on any node.
  • By default, all user content is private.
  • Users decide what they want to make public.

  • Users can send short messages, images, video and sound.
  • Users can create their personal web page.
  • Users can create projects and invite others to contribute.

You can track Bolixo evolution
Using Bolixo, register interest for bolixodev@alpha.bolixo.org or visit bolixodev
Using Bolixo, register interest for bolixonews@alpha.bolixo.org or visit bolixonews ?> /-

htmlprintf ("%s\n",tlmpweb_curpage(),MSG_U(I_COMPLETEDOC,"Complete documentation")); // Full documentation tlmpweb_title (MSG_R(T_BOLIXO_ORG_DIR)); util_defstyles(); tlmpweb_body ("white",NULL,"background=background.png"); DIV v; v.dispflex().flowcol().print(); DIV b("","top"); b.print(); bolixo_title(6); b.end(); DIV d("","search"); if (tlmpweb_ismobile()){ d.w(100).autoscroll().marginauto().vmargins(10,0).vpaddings(10,10).paddings(10,10).bg("white").print(); }else{ d.w(90).autoscroll().marginauto().vmargins(10,0).vpaddings(10,10).paddings(10,10).border(1,"black").borderradius(5).bg("white").print(); } DOCUMENT_POINTER pt; DOC_ID jump; bool index = !tlmpweb_ismobile(); if (w_robot == 1){ // For robot, we throw all languages /- All users in the directory
bolixo_doc (pt,jump,"",w_robot,index); bolixo_doc_fr(pt,jump,"",w_robot,index); }else if (strcmp(tlmpweb_getlang(),"eng")==0){ bolixo_doc (pt,jump,"",w_robot,index); }else{ bolixo_doc_fr(pt,jump,"",w_robot,index); }
// List all the directory for robots tlmpweb_title (MSG_R(T_BOLIXO_ORG_DIR)); tlmpweb_body ("white",NULL); unsigned offset = 0; while (true){ glocal bool more = false; (glocal.con,"a",offset,50); for (auto &u:users){ DIV d; d.border(1,"black").margins(5,5).vmargins(5,5).paddings(5,5).vpaddings(5,5).print(); const char *nodename = u.nodename; if (strncasecmp(nodename,"https://",8)==0){ nodename += 8; }else if (strncasecmp(nodename,"http://",7)==0){ nodename += 7; } htmlprintf ("user: %s@%s
\n",u.user,nodename); if (f(u.fullname)) htmlprintf ("fullname: %s
\n",u.fullname); if (u.photo) htmlprintf ("\n",tlmpweb_curpage(),u.user,u.nodename); if (u.mini_photo) htmlprintf ("\n",tlmpweb_curpage(),u.user,u.nodename); /-
if (f(u.address1)) htmlprintf ("address1: %s
\n",u.address1); if (f(u.address2)) htmlprintf ("address2: %s
\n",u.address2); if (f(u.city)) htmlprintf ("city: %s
\n",u.city); if (f(u.state)) htmlprintf ("state: %s
\n",u.state); if (f(u.country)) htmlprintf ("country: %s
\n",u.country); if (f(u.zipcode)) htmlprintf ("zipcode: %s
\n",u.zipcode); if (f(u.email)) htmlprintf ("email: %s
\n",u.email); if (f(u.phone)) htmlprintf ("phone: %s
\n",u.phone); if (f(u.fax)) htmlprintf ("fax: %s
\n",u.fax); if (f(u.bolixosite)) htmlprintf ("bolixosite: %s
\n",u.bolixosite,u.bolixosite); if (f(u.website)) htmlprintf ("website: %s\n",u.website,u.website); if (f(u.interest)){ DIV d("col3"); d.w(98).bg("lightgray").margins(2,2).paddings(4,4).borderradius(5).border(1,"gray").print(); htmlprintf ("%s\n",u.interest); } } if (users.size() >= 50) glocal.more = true;
if (glocal.more){ offset += 50; }else{ break; } }
} extern "C" void webmain() { ("unix:","/tmp/stop.sock",1); webmain_real(); end=true; webmain_real(); }