Page 1 of 1
Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 1:28 am
by MyHacks
Hello all!
I want to know if it's possible for CMSMS to handle one of my sites which has previously use PHP system.
The old script allows us to do searches on the site and give the results back to the users.
When we do a search, the site will have address like
http://sitex.com/index.php?search=test& ... ameter=etc )the main page is
http://sitex.com/index.php)
Will I have problems using this with CMSMS since there are parameters in the urls.
It is basically a simple search engine.
Thanks for replying.

Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 2:05 am
by Jeff
Yes you can pass parameter to a page. But you might want to look at different modules that might be able to do things for you. There already is a search feature.
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 2:08 am
by MyHacks
I can not use module since the parameter is part of the whole system.
Which one is better, integrate my parameter in the module or let the script pass the parameter to the system like it used to?
Sorry if this is confusing.
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 4:34 am
by JeremyBASS
If you use pretty URLs... which IMHO everyone should be... you just add the
?search=test&source=All¶meter=etc
to the end... fallow any one of my tips in the tips areas or look up any of my post and you'll see I do that alot...
Here is a tip... use .html as the page_exsention (look to config) and read the smarty man if you are not use to working with smarty and the templates... you can call a post/get/etc like
{$smarty.post.whatIpassed}
Hope that helps
Cheers
jeremyBass
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 4:40 am
by Jeff
MyHacks wrote:
I can not use module since the parameter is part of the whole system.
Which one is better, integrate my parameter in the module or let the script pass the parameter to the system like it used to?
Sorry if this is confusing.
Since you weren't specific of what this script does or why you just can't use the search module. We can't help you with what is better.
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 6:36 am
by MyHacks
Hello again!
JeremyBASS wrote:
If you use pretty URLs... which IMHO everyone should be... you just add the
?search=test&source=All¶meter=etc
to the end... fallow any one of my tips in the tips areas or look up any of my post and you'll see I do that alot...
Here is a tip... use .html as the page_exsention (look to config) and read the smarty man if you are not use to working with smarty and the templates... you can call a post/get/etc like
{$smarty.post.whatIpassed}
Hope that helps
Cheers
jeremyBass
It is a good tips but I don't really understand it since I'm not a pro in this. :-[
Is there any simpler explanation?
It's basically a simple search function that uses ... tag from HTML . It returns the bold string:
?search=
test&source=
All¶meter=
etc to the database and then it shows the results.
ajprog wrote:
MyHacks wrote:
I can not use module since the parameter is part of the whole system.
Which one is better, integrate my parameter in the module or let the script pass the parameter to the system like it used to? ???
Sorry if this is confusing.
Since you weren't specific of what this script does or why you just can't use the search module. We can't help you with what is better.
The search results are not only from my own site, but is also returns the results from other sites as well.
Here is the simple search code:
Code: Select all
<form method="get" action="index.php">
<input type="text" name="search" value="($_GET[search])?>">
<input type="submit" value="Search!">
</form>
It uses get funtion.
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 6:55 am
by alby
MyHacks wrote:
Here is the simple search code:
Code: Select all
<form method="get" action="index.php">
<input type="text" name="search" value="($_GET[search])?>">
<input type="submit" value="Search!">
</form>
You're trying to use the old script in CMSMS
Result go in index.php (your homepage) and if you have not something to process this you lost your search.
You must build a UDT (look in Documentation) that send your search params to your script or process them in your DB, retrieve result data and display them
Alby
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 9:33 am
by MyHacks
I tried to search 'UDT' in the wiki but it showed no result.
Yes, that was what I meant Alby.
Index.php has two functions, the first, search interface and process the parameters, the second, show the result.
Every code and function is already in index.php.
Will that paramaters and whole process affect my CMSMS? since I've seen the
CMSMS has its own parameters in its process too.
Thanks.

Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 12:38 pm
by alby
MyHacks wrote:
I tried to search 'UDT' in the wiki but it showed no result.
Yes, that was what I meant Alby.
Index.php has two functions, the first, search interface and process the parameters, the second, show the result.
Every code and function is already in index.php.
Will that paramaters and whole process affect my CMSMS? since I've seen the CMSMS has its own parameters in its process too.
http://wiki.cmsmadesimple.org/index.php ... fined_Tags
Sorry, but what is index.php ? your script or CMSMS it's not clear from your answer.
I talk of index.php of CMSMS
The only parameter that you must not use is
id (but I advise page and returnid also unless you know what you do)
Alby
Re: Can CMSMS handle my situation?
Posted: Thu Jun 18, 2009 3:28 pm
by MyHacks
Uh, I was talking about my index.php, I just knew that we were talking different file. lol.
I will summarize this topic to make myself clear. Please correct me.
The old functions from my old index.php script has to be moved to UDT. Since in the function does not return
id, I can safely use UDT.
But, it uses page in the parameter,
index.php?source=XXX&search=yyy
&page=2 -> this is the example.
1) Can I still use UDT in here?
Then, using the UDT in the index.php it will process the parsed parameters and variables and return the results back.
2) Do I summarize correctly?
3) Should I use single UDT for all functions or each function will have its UDT?
4) What is the best way to avoid these boring stuff? Any better idea for me :p
Thanks again for your support.

Re: Can CMSMS handle my situation?
Posted: Sun Jun 21, 2009 2:09 pm
by alby
MyHacks wrote:
But, it uses page in the parameter,
index.php?source=XXX&search=yyy&page=2 -> this is the example.
1) Can I still use UDT in here?
Change in config.php with someother
$config['query_var'] = 'page';
MyHacks wrote:
Then, using the UDT in the index.php it will process the parsed parameters and variables and return the results back.
2) Do I summarize correctly?
display result in your homepage, yes
MyHacks wrote:
3) Should I use single UDT for all functions or each function will have its UDT?
in one UDT only, any UDT has own space
MyHacks wrote:
4) What is the best way to avoid these boring stuff? Any better idea for me :p
Look to examples in
http://wiki.cmsmadesimple.org/index.php ... _tags_here
Alby
Re: Can CMSMS handle my situation?
Posted: Sun Jun 21, 2009 2:38 pm
by MyHacks
Thanks alby!
This should help me a lot.
