Pizza-Delivering-Service

discuss about sites that are just under construction or where experimental stuff is used
User avatar
FlashCrack
Posts: 10
Joined: Sat 17. Jan 2009, 17:15

Pizza-Delivering-Service

Post by FlashCrack »

---------------
Attachments
automatic letter from phpwcms forum.
automatic letter from phpwcms forum.
the template for my next website.
the template for my next website.
Last edited by FlashCrack on Fri 3. Apr 2015, 02:18, edited 1 time in total.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Pizza-Delivering-Service

Post by Jensensen »

Hi FlashCrack,
welcome!

The best way to get a dynamic menu will be using a {RT} = "replacement tag" for the navigation, e.g.
NAV_LIST_UL: http://www.phpwcms.de/forum/viewtopic.php?p=83839#83839
NAV_HORIZ_DD http://www.phpwcms.de/forum/viewtopic.php?t=16080

There are many other RTs you can read about right here in the forum or on the "Docu-Site":
http://www.phpwcms-docu.de/navigations_tags_.phtml (DE)
http://www.phpwcms-docu.de/navigation_tags.phtml (EN)
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: Pizza-Delivering-Service

Post by flip-flop »

Hi,

for me the right way wolud be this "eierlegende Wollmilchsau" WRAP_NAV_LIST_UL

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Pizza-Delivering-Service

Post by Jensensen »

:mrgreen: :mrgreen: :mrgreen:
right you are!
but in what way this could be [become] part of the 'official' code?
[to be used straight of the shelves -core]
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
FlashCrack
Posts: 10
Joined: Sat 17. Jan 2009, 17:15

Re: Pizza-Delivering-Service

Post by FlashCrack »

Haha awesome I can develop my own codes! I really have to try that out one time, I see so many possibilities! Mayber there's a thread which explains all important phpwcms variables? I really have to try out some own codes thanks!

Also thanks for such a fast answer!

After reading many articles plus the links which I you posted all I still don't understand how to use one of those codes right... I'll try it further and hope that meanwhile is willing to help the greenhorn, hehe...
my website structure.
my website structure.
websitestructure.gif (10.54 KiB) Viewed 14678 times
my menustructure and this is my currently super developed template:

Code: Select all

<div class="mybreadcrumb" style="border:1px solid #000;">
    {BREADCRUMB}
</div>
<div class="mycontent" style="border:1px solid #000;">
    {CONTENT}
<div>
<div class="senormenulanumerouno" style="border:1px solid #000;">
    {thecodeformenu1}
</div>
<div class="senormenulanumerodos" style="border:1px solid #000;">
    {thecodeformenu2}
</div>
Man I like the idea of programming your own codes a lot!
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: Pizza-Delivering-Service

Post by flip-flop »

Ah, yes I see. You don´t user a hirarchical category tree like:

Code: Select all

+ root
++ News
++ Über uns
++ Kontakt
++ ......
++ Speisekarte
++++ Nudelgerichte
++++ Mexikanische Gerichte
++++ Toast
++++ .....
But that is a better solution to do so.

At this time we haven´t an real article navigation. (All navigations based on categories.)

If you don´t want to change to categories for every meal section, please use the the CP "Artikelmenü" for solving your problem.
Have a look to "cms. ritterhoff. de" -> Bücher -> e.g. 1999-2001 (Please don´t make this adress visible in forum).
At the left you will see "Bücherliste 1999-2001". At this point the CP "Artikelmenü" is running.

Your special problem:
1. Create a hidden category

2. Move Speisekarte into this hidden category

Code: Select all

+ root
++ News
++ Über uns
++ Kontakt
++ ......
++ ==== Hidden    [x] hidden  and sitemap, search ..... = off
++++ Speisekarte  [ ] hidden  (e.g. using the ID=19) (e.g. ID=29)
3. Create behind === Hidden a category named "linke_navi"

Code: Select all

++ ......
++ ==== Hidden    [x] hidden  and sitemap, search ..... = off
++++ Speisekarte  [ ] hidden  (e.g. using the ID=29) 
++++ linke_navi   [ ] hidden  (e.g. using the ID=34)
4. In Article (site structure and article list) -> === hidden -> linke_navi
create an article named e.g. "Linke Navi"

5. Insert behind this article the CP "article menu" (assuming that the CP is ID=19)
- site level: [ ] current site level
select the right category (Speisekarte)

6. In your template insert: (assuming cp in linke_navi has the cp ID=19)

Code: Select all

[PHP] // ==== Speisekarte: Permanente Ausgabe des CP mit ID=19 ==== 
      echo '<div><div id="my_class">{SHOW_CONTENT:CP,19}</div></div>'.LF;
[/PHP]
7. In conf.inc.php must be set:

Code: Select all

$phpwcms['allow_cntPHP_rt']   = 1; // allow PHP replacement tags and includes in content parts

I hope it is running well.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
FlashCrack
Posts: 10
Joined: Sat 17. Jan 2009, 17:15

Re: Pizza-Delivering-Service

Post by FlashCrack »

Awesome it's working, thanks! That's the result which I wanted. For some reasons I never saw the article menu! Finally I can go to the next step and finish the template by creating the flash header. I still have some questions for the 3rd step, maybe it's good to ask them now:

is it possible to hide root somehow?

I understood every part which you explained me except that one:

Code: Select all

[PHP] // ==== Speisekarte: Permanente Ausgabe des CP mit ID=19 ====
      echo '<div><div id="my_class">{SHOW_CONTENT:CP,3}</div></div>'.LF;
[/PHP]
I didn't understood why I have to use php there; and I don't know what my_class is... also the .LF on the end. Well I think I have to read many documents in this forum to understood those my_class'es and the .LF part anyway after that I just tried

Code: Select all

{SHOW_CONTENT:CP,3}
and there was no change. many I sure have to learn a lot of things.

and again, thanks a lot for the amazing help! I hope I can contribute somehow after learning lots of stuff.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Pizza-Delivering-Service

Post by Jensensen »

FlashCrack wrote:... I hope I can contribute somehow after learning lots of stuff.
It's assumed and hoped for that you do so...

.LF is for cosmetic code only :wink:
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: Pizza-Delivering-Service

Post by flip-flop »

Code: Select all

[PHP] // ==== Speisekarte: Permanente Ausgabe des CP mit ID=19 ====
      echo '<div><div id="my_class">{SHOW_CONTENT:CP,3}</div></div>'.LF;
[/PHP]
is the same like

Code: Select all

<div><div id="my_class">{SHOW_CONTENT:CP,3}</div></div>
You don´t require the PHP container for your needs.
His birth was this one:

Code: Select all

[PHP] // ==== Buecherliste: Ausgabe bei ID unterhalb 2 ==== 
  if (($GLOBALS['LEVEL_ID'][1]) == 2 && isset($GLOBALS['LEVEL_ID'][2])) {
    echo '<div id="box01_top1"><div id="box01_top">{SHOW_CONTENT:CP,13}{BOX_01}</div></div>'.LF;
  }
[/PHP]
(Only running {SHOW_CONTENT:CP,13} if the category with ID=2 in first level is the active path and we stand actually in the second level)
- I have stooped this snippet. And the result you have seen. :?

I think you can use {SHOW_CONTENT:CP,3} exclusively.

"my_class" is only an popularly placeholder for classes in forum threads.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
FlashCrack
Posts: 10
Joined: Sat 17. Jan 2009, 17:15

Re: Pizza-Delivering-Service

Post by FlashCrack »

One question: Does anyone knows where I can find a good tutorial to make a module? The only thing what I found was this:

http://jgbm.de/Module-creation-guide-1.phtml

but it seems like it's not finished D:

EDIT: Nevermind I gave up haha

But don't worry, I'll still continue to create this website.
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Pizza-Delivering-Service

Post by juergen »

gimme 20 Minutes :mrgreen:
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Pizza-Delivering-Service

Post by juergen »

done (mostly)
User avatar
FlashCrack
Posts: 10
Joined: Sat 17. Jan 2009, 17:15

Re: Pizza-Delivering-Service

Post by FlashCrack »

Gee thanks for sharing your knowledge! Just in 20 minutes? Haha that's what I call fast.

Cause the module system is to complicate for me, I wanted to use [PHP][/PHP] command instead developing as a module. But I have to say this explaination could be the key to come further.

Anyway that's my plan:

I want to make something like a catalogue system. First I'll work on the mysql database, insert it with some test informations n stuff. Second developing the output with javascript and php. If everything's working like it should I'll work on a module for it to maintain this module. Of course this module have to be programmed more flexibel but let's see first how far I come :D
User avatar
FlashCrack
Posts: 10
Joined: Sat 17. Jan 2009, 17:15

Re: Pizza-Delivering-Service

Post by FlashCrack »

Awww I have problems with my scripts right now!

-I made one database and filled it with infos.
-I made one script which get those informations and display it.
-Also some javascript

If I run this script everything is working like it should, but if I insert this script [PHP][/PHP] I get a blank screen! (between the body tags is nothing)

Also the javascript which I made doesn't work anymore by any script which I bind in with the same method ([PHP][/PHP]).

What is going on? I can't develop further if I don't get here a solution T_T

EDIT: I found out that template/inc_js/frontend.js is blocking my javascript, is frontend.js important? Seems like nothing changed, just my script is working now.

Still, I don't get why I get a blank screen trying to run it on frontend... maybe my Source code is too big? I think just a special uhhh stringlength? Characterlengh? Contentlength? Zeichenlänge? Is allowed...

for example: A post in this post can be 60000 characters long, so post with a length over 60000 character ain't possible
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: Pizza-Delivering-Service

Post by flip-flop »

I think, the better way is to carry out the calling or whole script into /frontend_render/.

Make a replacer script like this (absolutely without any Sinn) :D e.g.:

Code: Select all

<?php
/* ================================================================
dd.mm.yyyy Short descrition
Autor: My Name

TAG: {My_Tag} 
Filename: my_tag_replacer.php
Folder:  /template/inc_script/frontend_render/
Switch:  $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)
 
Forum:   http://forum.phpwcms.org/viewtopic.php?p=xxxxx
   ================================================================ */
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
if( ! (strpos($content["all"],'{My_Tag:')===false)) {


  function func_my_specials ($spec1,$spec2) {

    $my_spec_result = ' ['. $spec2 . ' + '. $spec1 . ']';

  return $my_spec_result;
  }


  function func_my_tag_replacer ($var1, $var2, $var3 = "no parameter catched") {
    // My_php_code/source; 
    // e.g.
    $my_result = ' var1= '. $var1 . func_my_specials ($var3,$var2) . '<br /> var2= '. $var2 . '<br /> var3= '. $var3 . '<br />'. LF;

  return $my_result;
  }
 
 
// {My_Tag:,,} or {My_Tag:}
// -----------------------------------------------------

   $content["all"] = str_replace('{My_Tag:}', func_my_tag_replacer("Werner","Ulla"), $content["all"]);
   
   $content["all"] = preg_replace('/{My_Tag:(.*?),(.*?),(.*?)}/e', 'func_my_tag_replacer("$1","$2","$3")', $content["all"]);
// -----------------------------------------------------

}
// -----------[ CLOSE ]----------------
?> 
Call:

Code: Select all

{My_Tag:}

{My_Tag: erster toller Text, zweiter toller text, dritter toller Text}
Output:
var1= Werner [Ulla + no parameter catched]
var2= Ulla
var3= no parameter catched


var1= erster toller Text [ zweiter toller text + dritter toller Text]
var2= zweiter toller text
var3= dritter toller Text
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply