I've posted before but no one replied because I think it was confusing.
My problem is that I have a website where users have profile pages, and
they can each chooser their own (i.e. blogger.com) Point of this
question is...how can I make a system where template layouts (e.g, 3
column layout, 2 column, vertical, horizontal) can be created for it so
it's scalable and easy to make "templates" for? I just need some
concepts and methods of how to do this PLEASE!!!!!!!!! ! this is holding
up a project and i'm REALLYYY getting annoyed with it...
PLEASE give example code...the system I have now is kind of like
this...
/* SOME SQL QUERIES FOR THE $users array, and manipulation */
$t = new template;
$t->_template_pa th = $template_path; # /core/templates/blue/
$t->_template = $users['template']; # blue.template
$t->_css_file = $users['style_sheet']; # 'template.css'; etc
$t->_meta = $users['meta_tags']; # users keywords, etc
$t->_title = $users['title']; # title of page "Johns page" etc.
$t->_content = $users['content']; # contains the objects/modules they
want in the main body div
$t->_left_conten t = $users['left_content'] # left div content (if
turned on)
$t->_right_conte nt = $users['right_content'] # right div content (if
turned on)
$t->render(); # draw everything
inside the template class it basically just gets all the .template
files, arranges them in order does some queries and echoes them... I
need help, is this even a good idea? will this be way too slow? is
there a simpler way to do it? HELP!!!!!!!!!
Jan 26 '06
12 1309
"bryan" <te******@gmail .com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com... Smarty is it's own language...way too involved for what I need I need fast, quick, effective and scalable (smarty is out althought it could be all of the above, it's too much.)
It's very easy to write your own small and quick templating toolkit for
doing exactly that. Just think about it logically, and work out great
methods for caching your templates into something that can be used quickly,
and take it from there.
Erm.. Smarty is fast, quick, very effective and scalable. It's not
really 'too much', it helps a great deal! I've done a system using
smarty where user can choose their preferred skin, all I had to do was
pull the CSV value from db (skinname,skint ype,skinlayout) and dump
these values to smarty to pick the correct skins.
Caching is also easy with smarty.
However, Smarty needs some getting used to. You're quite right when you
say it's like learning a new language, but once you're used to it,
you'll wonder how did you even code your websites without it!
bryan wrote: Smarty is it's own language...way too involved for what I need I need fast, quick, effective and scalable (smarty is out althought it could be all of the above, it's too much.)
Why not use a cms - eg Drupal?
PS: I have experimented with Drupal and have decided to hand code my
websites because Drupal (and other cms's) are too fragmented and provide far
more options than I will need, in code that is too difficult to comprehend
because it comes from so many different sources. But, it might be suitable
for you because it is very easy to allow users to select their own style
from a selection of styles that you can provide, add to, and customise.
"bryan" <te******@gmail .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. . I've posted before but no one replied because I think it was confusing. My problem is that I have a website where users have profile pages, and they can each chooser their own (i.e. blogger.com) Point of this question is...how can I make a system where template layouts (e.g, 3 column layout, 2 column, vertical, horizontal) can be created for it so it's scalable and easy to make "templates" for? I just need some concepts and methods of how to do this PLEASE!!!!!!!!! ! this is holding up a project and i'm REALLYYY getting annoyed with it... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rex_chaos |
last post by:
Hi all,
suppose A is an array. With the help of template function
find_first_of and find_end, I got two desired elements of array. How
can I tell the distance between these two elements?
|
by: Jim West |
last post by:
I have a template class (for numerical processing) that was originally
written for real data that I need to extend to complex data, and I am
running into a problem. The current version (greatly simplified) has
something like
template <class T>
class FOO {
T A;
T B;
};
|
by: Dave |
last post by:
Hello,
Thanks for your help on the short problem shown below.
Thanks!
Dave
#include <iostream>
|
by: Dave |
last post by:
Hello,
Below, I have included a short program that does not compile. The
problematic line is indicated with a comment. Comeau produces this error:
"ComeauTest.c", line 19: error: type name is not allowed
T::bar_t<int> local;
^
Please note that the answer is *not* to preface the offending line with
"typename".
|
by: suzy |
last post by:
hi,
i have created a aspx page template by creating a template.cs file which
inherits from the page class. In this file I override the OnInit event and
create a template in the form of a header, left menu and a footer. there is
also a body area where the main content of the page will go.
i created these 4 areas by dynamically creating a placeholder in each area
at runtime. in the template.cs i load user controls into each area...
| |
by: scorpion53061 |
last post by:
Hello,
I have been asked to write a program and allow the end user to create
custom fields in a SQL Server database in addition to the premade
fields.
|
by: Adnan |
last post by:
Hi!
I am newbie in template stuff and I am getting error for the following
program
#include "stdafx.h"
using namespace std;
|
by: martin |
last post by:
Hello,
Today I fetched the standard Access-2003 template "orders management db"
from
http://office.microsoft.com/en-au/templates/TC010185481033.aspx?pid=CT101426031033
In de openingform one sees a column "extended price"
Perhaps I dont understand this too well, but shouldn't this be something
like quantity*unitprice?
|
by: resurgentnaveen |
last post by:
Hi ,
I am trying to use Active Scaffold in my project and i need this
template overriding feature of Active Scaffold.
I am following the instructions on the link http://www.activescaffold.com/docs/template-overrides
Could someone help me some piece of code for that
Thanks in Advance
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |