mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 04:07:13 +03:00
gigabot advice blurb.
This commit is contained in:
parent
61f919a19c
commit
253ed05074
@ -105,6 +105,13 @@ bool sendPageAddDelColl ( TcpSocket *s , HttpRequest *r , bool add ) {
|
||||
"</center><br>\n",cc,msg);
|
||||
}
|
||||
|
||||
|
||||
if ( add ) {
|
||||
printGigabotAdvice ( &p , PAGE_ADDCOLL );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// print the add collection box
|
||||
if ( add /*&& (! nc[0] || g_errno ) */ ) {
|
||||
p.safePrintf (
|
||||
|
@ -931,6 +931,9 @@ bool sendPageBasicStatus ( TcpSocket *socket , HttpRequest *hr ) {
|
||||
// this prints the <form tag as well
|
||||
g_pages.printAdminTop ( &sb , socket , hr );
|
||||
|
||||
if ( format == FORMAT_HTML )
|
||||
printGigabotAdvice ( &sb , PAGE_BASIC_STATUS );
|
||||
|
||||
// table to split between widget and stats in left and right panes
|
||||
if ( format == FORMAT_HTML ) {
|
||||
sb.safePrintf("<TABLE id=pane>"
|
||||
|
97
Pages.cpp
97
Pages.cpp
@ -1452,7 +1452,13 @@ bool Pages::printAdminTop (SafeBuf *sb ,
|
||||
|
||||
sb->safePrintf("<br>");
|
||||
|
||||
|
||||
|
||||
if ( page != PAGE_BASIC_SETTINGS )
|
||||
return true;
|
||||
|
||||
|
||||
// gigabot helper blurb
|
||||
printGigabotAdvice ( sb , page );
|
||||
|
||||
// begin 2nd row in big table
|
||||
//sb->safePrintf("</td></TR>");
|
||||
@ -1461,6 +1467,95 @@ bool Pages::printAdminTop (SafeBuf *sb ,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool printGigabotAdvice ( SafeBuf *sb , long page ) {
|
||||
|
||||
// gradient class
|
||||
// yellow box
|
||||
char *box =
|
||||
"<table cellpadding=5 "
|
||||
// full width of enclosing div
|
||||
"width=100%% "
|
||||
"style=\""
|
||||
|
||||
//"background-color:gold;"
|
||||
//"border:3px blue solid;"
|
||||
|
||||
"background-color:lightblue;"
|
||||
"border:3px blue solid;"
|
||||
|
||||
|
||||
"border-radius:8px;"
|
||||
//"max-width:500px;"
|
||||
"\" "
|
||||
"border=0"
|
||||
">"
|
||||
"<tr><td>";
|
||||
char *boxEnd =
|
||||
"</td></tr></table>";
|
||||
sb->safePrintf("<div style=max-width:490px;"
|
||||
"padding-right:10px;>");
|
||||
sb->safePrintf("%s",box);
|
||||
|
||||
char *advice = NULL;
|
||||
if ( page == PAGE_ADDCOLL )
|
||||
advice =
|
||||
"STEP 1 of 3. "
|
||||
"<br>"
|
||||
"<br>"
|
||||
"Begin. Human, I am Gigabot."
|
||||
"<br><br>"
|
||||
"Enter the name of your collection "
|
||||
"(search engine) in the box below then hit "
|
||||
"submit."
|
||||
"<br>"
|
||||
"<br>"
|
||||
"Do not deviate from this path or you may "
|
||||
"be blasted.";
|
||||
if ( page == PAGE_BASIC_SETTINGS )
|
||||
advice =
|
||||
"STEP 2 of 3. "
|
||||
"<br>"
|
||||
"<br>"
|
||||
"Enter the list of websites you want to be in your "
|
||||
"search engine into the box marked <i>site list</i>."
|
||||
"<br>"
|
||||
"<br>"
|
||||
"Do not deviate from this path, or, as is always the "
|
||||
"case, you may "
|
||||
"be blasted.";
|
||||
if ( page == PAGE_BASIC_STATUS )
|
||||
advice =
|
||||
"STEP 3 of 3. "
|
||||
"<br>"
|
||||
"<br>"
|
||||
"Ensure you see search results appearing in "
|
||||
"the box below. If not, then you have spider "
|
||||
"problems."
|
||||
"<br>"
|
||||
"<br>"
|
||||
"Click on the links in the lower right to expose "
|
||||
"the source code. Copy and paste this code "
|
||||
"into your website to make a search box that "
|
||||
"connects to the search engine you have created. "
|
||||
"END."
|
||||
;
|
||||
|
||||
|
||||
// the mean looking robot
|
||||
sb->safePrintf("<img style=float:left;padding-right:15px;"
|
||||
"padding-top:10px;padding-bottom:10px;"
|
||||
" "
|
||||
"height=141px width=75px src=/robot3.png>"
|
||||
"<b>"
|
||||
"%s"
|
||||
"</b>"
|
||||
, advice
|
||||
);
|
||||
sb->safePrintf("%s",boxEnd);
|
||||
sb->safePrintf("<br><br></div>");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
bool Pages::printAdminTop2 (SafeBuf *sb ,
|
||||
|
2
Pages.h
2
Pages.h
@ -33,7 +33,7 @@ bool sendPageBasicSettings ( TcpSocket *s , HttpRequest *r );
|
||||
bool sendPageBasicStatus ( TcpSocket *s , HttpRequest *r );
|
||||
//bool sendPageBasicDiffbot ( TcpSocket *s , HttpRequest *r );
|
||||
|
||||
|
||||
bool printGigabotAdvice ( SafeBuf *sb , long page ) ;
|
||||
|
||||
bool sendPageRoot ( TcpSocket *s , HttpRequest *r );
|
||||
bool sendPageRoot ( TcpSocket *s , HttpRequest *r, char *cookie );
|
||||
|
Loading…
Reference in New Issue
Block a user