Page 1 of 1

Navigation, CSS and replacement tags

Posted: Wed 4. May 2005, 01:54
by Sevenupcan
Being completely new to how replacement tags work, i have read as much as i can find, and i am still strugling to figure out how they work.

Are the tags predefined somewhere? And can you make your own?

The reason i ask is that I am trying to create a navigation system which i currently have in a static html format, http://www.slogmeat.com/navigation.html (please note that at the moment this will not display correctly in Internet Explorer) and intregrate it with the php WCMS.

How would i go about doing this, from someone thats a bit more experience than i am with this.

Thank-you

Posted: Wed 4. May 2005, 07:51
by pico
Hi

you can build your own Replacement Tags - see a Sample in ../phpwcms_template/inc_script/frontend_render and frontend_init in your Folders.

For the Navigation take a look into the 'hacks&enhancedments'-Forum and
--...--/

Posted: Thu 5. May 2005, 00:01
by Sevenupcan
Thanks,

Would anyone mind explaining some php to me if they have the time?

I'm a real newb(beginner) when it comes to php. After being used to working only in (x)html, and css it's can be slightly hard to grasp php, but i'm sure it's relatively easy to pick up.

For example lets take the following, that i have taken from the file sample.php_ in phpwcms_template>inc_script>frontend_render:

Code: Select all

<?php 

// do something here

//$content['all'] .= build_dhtmlmenu(0, 'id="meineID" class="myclass"', 'class="active"');
?>
What i know is that a php scripting block starts with <?php and ends with ?> and i understant that a variable is stated by using $. What does the rest do? and what does this particular piece of script do?

Thanks again for your time.

Posted: Fri 6. May 2005, 04:25
by azterizk
Yes I understand at first I was lost. However, I use jEdit as my text editor and it has a really cool HyperSearch ability. Basically you can search for "{IMAGE" in *.php files in all subdirectories of my installed phpwcms_v1 directory. This has allowed me to locate some of the guts of the phpwcms rather quickly and get a better understanding of how it works.

As for that section of code basically .= means take the variable itself and tack on to the end (or i = i + stuff instead shorthand i += stuff). So, it is adding to the end of $content['all'] (an array variable whose specific value at index 'all' is being set) to the output of the php function build_dhtmlmenu. You can find that I belive in front.func.inc.php or something like that.

Essentially that function generates a UL LI listing of your site. That if not formatted with the proper CSS would look a lot like a sitemap. But you appear to already understand that on the site you posted.

Oh and I always hate when I ask a question about customizing phpWCMS and the FIRST response is always search dev-brenner-b-e. Well, unless you are for sure it is there don't tell me to go on a witch hunt. And if it is there please take a second to find it and post the link. Otherwise, don't waste your time posting. So, here is the link I believe you are looking for: --...--/index.php/topic,68.0.html. The build_dhtmlmenu is already included in phpWCMS starting as of version 1.1.2 I believe. However, you can search for the text and see if you find it. I know for a fact it is already in the prerelease 1.2.2.

Hope this helps. If not PM me on this forum with more questions and I would be happy to pass on any php or phpWCMS knowledge I have gained.

Posted: Fri 6. May 2005, 17:44
by Sevenupcan
Thanks for you help azterizk I'm currently working on trying to get this to work:

http://www.phpwcms.de/forum/viewtopic.p ... t=60#35692

I might PM you asking for your advice i difficulty getting it to work, so watch out! lol