PostNuke

Flexible Content Management System

News



Creating your own database tool in Nuke

Then imagine you want to allow all visitors to the intrnaet (only registered users) to query this database, say by name of town oder name of company.





Big deal! You might say. Just modify the user.php and memberlist.php and there you go.


Right. But can you imagine that there is anybody in the Nuke community who needs exactly THIS feature? Probalby one person wants to add addresses, another one wants to add company profiles and another one just wants to add some products with details.





All ideas require that you can decide via and admin tool:





- which fields you need,


- how many fields you need,


- which fields can be searchable


- which fields contain the primary key





Then this system would create the appropriate tables in the Nuke database.





Now special registered users (with the new user system the assigning of different groups promises to work) could enter their data in the appropriate fields.





The "normal" registered user could call the page and search for some criteria.





Just imagine companies putting their job ads online. O.k., classified ads system, you might say. But the idea I had was to create a totally dynamic classified ads system where each user can decide himself, how it is going to be used.





Does anybode have an idea where to obtain such a system or would anybody like to tackle it? I can give ideas, unfortunately I am not a programmer.





Cheers and thanks for your attention.





Titus.






ModBuilder for Nuke Fallout

Some built in features include:
  • Pure templates (no PHP)
  • No query strings
  • URI based sql select queries
  • Unlimited domains and subdomains (using wildcard DNS settings)
  • Instant conversion to any format (XML, RSS, text, WAP ...)
  • Reusing all code.
  • Drop 'n run "products" (or add ons / modules etc...)

    I call it XPC, eXtensible Page Creation. Remember this is a conceptual Framework. In it by itself it does nothing. It allows you to use it to do a lot. Such as a web hosting company, member's each have their own portals etc...

    I am in pre-alpha stages before the first release of the XPC framework. The administration "product" of the Products is not done yet.

    Nuke add ons and modules can easily be turned into "products" that can be reused with your XPC framework (however you choose to use it).

    I am sure there will be a lot of questions when this is posted. First off, the code is not available as of yet (only to active developers) You can view the developmnet site here http://dev.4arrow.com and sign up if you like. How does this fit into Nuke? I am not sure. I guess there is a lot of ways to utilize XPC by being creative. XPC is just a skeleton in which to easily maintain unlimited domains and subdomains by reusing the same code. The content or "products" visitors will actually see or use will be up to you. Remember also that there is pure html templates and each request for a page has unique meta data information, no query strings, and it can reuse or have its own template.

    Anyone who is interesed in learning more or helping me finish the XPC module builder can email me at mglazer@xpc.4arrow.com

    PS XPC uses PHP classes (OOP) to abstract the code. There are currently 4 classes that are done, 2 not quite and three more planned. Classes include:
  • xpc (URI manipulation)
  • members (authentication library) change email, send email, change password, delete account, sign up, is_logged, edit information, logout,
  • SQL query constructor
  • Meta data creation unique keywords are generated for each page.
  • Template class that uses placeholders instead of PHP to identify where content should be placed in the template when a page is called.
  • Navigation class allows for 13 different styles of dynamically generated navigation to be used. You can use more then one style on one page such as a sitemap and a drop down menu as well as a top navigation.
  • the XMl class is planned (stores data in XML files instead of the middle man SQL server (Load saver))
  • A FTP class is planned to allow for remote connections (file transfers, client server relationships etc....)
  • I was also thinking about a form class but I am not sure of the usefulness of html creation when you are using templating to separate code form design.


  • Improved headlines function



    The guts of this function is also present is admin/modules/blocks.php BlocksAdd().





    Seems to me that a new function that pulls an RSS feed into a mutidimensional array should be created and this function called where necessary such as in headlines() and BlocksAdd()





    functions are below:








    function headlines($bid) {


    global $prefix;


    $result = mysql_query("select title, content, url, refresh, time from $prefix"._blocks." where bid='$bid'");


    list($title, $content, $url, $refresh, $otime) = mysql_fetch_row($result);


    $title = "$title";


    $past = time()-$refresh;


    if ($otime $title";


    $content = ""._RSSPROBLEM."";


    $result = mysql_query("update $prefix"._blocks." set content='$content', time='$btime' where bid='$bid'");


    themesidebox($title, $content);


    return;


    }


    if ($fp) {


    fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0rn");


    fputs($fp, "HOST: " . $rdf['host'] . "rnrn");


    while(!feof($fp)) {


    $pagetext = fgets($fp,300);


    $lines[] = chop($pagetext);


    }


    fputs($fp,"Connection: closernrn");


    fclose($fp);


    for ($j=0;$j",$lines[$j])) { // Assume this as start point in most RSS/RDF feeds


    $startnum = $j;


    break;


    }


    }


    $content = "";


    for ($i=$startnum;$i(.*)",$lines[$i],$regs)) {


    $title2 = $regs[1];


    $title2 = str_replace("&","&",$title2);


    $titlearray[] = htmlspecialchars($title2,ENT_QUOTES); // should transform most html characters


    }


    else if (ereg("(.*)",$lines[$i],$regs)) {


    $link[] = $regs[1];


    }


    else if (ereg("(.*)",$lines[$i],$regs)) {


    $description[] = $regs[1];


    }


    if ($lines[0] == "") {


    $content = ""._RSSPROBLEM."";


    $title = "$title";


    $result = mysql_query("update $prefix"._blocks." set content='$content', time='$btime' where bid='$bid'");


    themesidebox($title, $content);


    return;


    }


    }


    for($i=0;$i· <a href>$titlearray[$i]
    n";


    if($description[$i]) {


    $content .= "$description[$i]
    ";


    }


    }


    $title = "$title";


    for ($i=0;$i(.*)",$lines[$i],$regs)) {


    $url = $regs[1];


    break;


    }


    }


    $siteurl = ereg_replace("http://","",$url);


    $content .= "
    <a href>"._HREADMORE."";


    }


    $result = mysql_query("update $prefix"._blocks." set content='$content', time='$btime' where bid='$bid'");


    }


    themesidebox($title, $content);


    }











    function BlocksAdd($title, $content, $url, $position, $active, $refresh, $headline) {


    global $prefix;


    if ($headline != 0) {


    $result = mysql_query("select sitename, headlinesurl from $prefix"._headlines." where hid='$headline'");


    list ($title, $url) = mysql_fetch_row($result);


    }


    $result = mysql_query("SELECT weight FROM $prefix"._blocks." WHERE position='$position' ORDER BY weight DESC");


    list ($weight) = mysql_fetch_array($result);


    $weight++;


    $title = stripslashes(FixQuotes($title));


    $content = stripslashes(FixQuotes($content));


    $bkey = "";


    $btime = "";


    if ($url != "") {


    $btime = time();


    if (!ereg("http://",$url)) {


    $url = "http://$url";


    }


    $rdf = parse_url($url);


    $fp = fsockopen($rdf['host'], 80, $errno, $errstr, 15);


    if (!$fp) {


    rssfail();


    exit;


    }


    if ($fp) {


    fputs($fp, "GET " . $rdf['path'] . "?" . $rdf['query'] . " HTTP/1.0rn");


    fputs($fp, "HOST: " . $rdf['host'] . "rnrn");


    while(!feof($fp)) {


    $pagetext = fgets($fp,300);


    $lines[] = chop($pagetext);


    }


    fputs($fp,"Connection: closernrn");


    fclose($fp);


    for ($j=0;$j",$lines[$j])) { // Assume this as start point in most RSS/RDF feeds


    $startnum = $j;


    break;


    }


    }


    $content = "";


    for ($i=$startnum;$i(.*)",$lines[$i],$regs)) {


    $title2 = $regs[1];


    $title2 = str_replace("&","&",$title2);


    $titlearray[] = htmlspecialchars($title2,ENT_QUOTES); // should transform most html characters


    }


    else if (ereg("(.*)",$lines[$i],$regs)) {


    $link[] = $regs[1];


    }


    else if (ereg("(.*)",$lines[$i],$regs)) {


    $description[] = $regs[1];


    }


    if ($lines[0] == "") {


    $content = ""._RSSPROBLEM."";


    $title = "$title";


    $result = mysql_query("update $prefix"._blocks." set content='$content', time='$btime' where bid='$bid'");


    themesidebox($title, $content);


    return;


    }


    }


    }


    for($i=0;$i· $titlearray[$i]
    n";


    if($description[$i]) {


    $content .= "$description[$i]
    ";


    }


    }


    }


    if (($link) AND ($title2)) {


    $siteurl = ereg_replace("http://","",$url);


    $content .= "
    "._HREADMORE."";


    }


    if ($content == "") {


    rssfail();


    } else {


    $content = addslashes($content);


    $result = mysql_query("insert into $prefix"._blocks." values (NULL, '$bkey', '$title', '$content', '$url', '$position', '$weight', '$active', '$refresh', '$btime')") or die(mysql_errno(). ": ".mysql_error());


    Header("Location: admin.php?op=BlocksAdmin");


    }


    }









    First Page Previous Page Page 261 / 277 (2601 - 2610 of 2763 Total) Next Page Last Page