Programming Advice
Page 1 of 1 • Share •
Programming Advice
hello fellow forumotioners
I'm a pinch right now.. one of my personal projects needs your help
regarding a simple program it is
only one objective:
for certain text it should return another text, thats all
these pre-determined responses should be storable as well
should i use visual basic?
if there is some programmer lurking through this thread please help~
I'm a pinch right now.. one of my personal projects needs your help
regarding a simple program it is
only one objective:
for certain text it should return another text, thats all
these pre-determined responses should be storable as well
should i use visual basic?
if there is some programmer lurking through this thread please help~

RikaComet- Forumotion Member
-

Posts: 1465
Age: 18
Language: English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location: thing called Earth
Country:
Join date: 2008-09-01
Re: Programming Advice
Personally for something like that,
I would use php and Javascript, the javascript will be needed to make the search, wait time, and results smooth as well as the trigger in order to return a result and the php will be used to store data and calculate the algorithm
Regards
Craig
I would use php and Javascript, the javascript will be needed to make the search, wait time, and results smooth as well as the trigger in order to return a result and the php will be used to store data and calculate the algorithm
Regards
Craig
Re: Programming Advice
Post edit :
Here is an example.
$text = preg_replace('#\[b\](.+)\[/b\]#isU', '<strong>$1</strong>', $texte);
This is for example how the tags
is replaced by :
Hope you understand...
Edit : I didn't know this kind of message was accepted?
-=~Splytte~=-
Here is an example.
$text = preg_replace('#\[b\](.+)\[/b\]#isU', '<strong>$1</strong>', $texte);
This is for example how the tags
- Code:
[b]Text[/b]
is replaced by :
- Code:
<strong>Test</strong>
Hope you understand...
Edit : I didn't know this kind of message was accepted?
-=~Splytte~=-

Splytte- Forumotion Member
-

Posts: 737
Age: 22
Language: French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location: Belgium
Country:
Join date: 2006-04-04
Re: Programming Advice
I would use php and Javascript, the javascript will be needed to make the search, wait time, and results smooth as well as the trigger in order to return a result and the php will be used to store data and calculate the algorithm
can it be done in visual basic? and stroing the data using sql?
@splytte: well I'm not asking help for forum , just avoiding paying a pro for such simple job lol: atleast its way better that "random facts about forumotion " or "why did you chose forumotion" stuff

RikaComet- Forumotion Member
-

Posts: 1465
Age: 18
Language: English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location: thing called Earth
Country:
Join date: 2008-09-01
Re: Programming Advice
I know, and what I give you is not only for forums, you can use it to replace anything you want...
-=~Splytte~=-
-=~Splytte~=-

Splytte- Forumotion Member
-

Posts: 737
Age: 22
Language: French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location: Belgium
Country:
Join date: 2006-04-04
Re: Programming Advice
what is it actually? mind telling me how it is used?

RikaComet- Forumotion Member
-

Posts: 1465
Age: 18
Language: English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location: thing called Earth
Country:
Join date: 2008-09-01
Re: Programming Advice
This is a PHP regex.
The function preg_replace() replaces a certain text by another one.
For example, you have a variable text1, and you want to change a word in it.
# : It is the delimiter for what you want to change.
-=~Splytte~=-
The function preg_replace() replaces a certain text by another one.
For example, you have a variable text1, and you want to change a word in it.
- Code:
<?php
// The first variable
$text1 = 'Cailhem is a good boss';
// You want to replace the word "good" by "bad"
$text2 = preg_replace('#good#', 'bad', $text1);
// You print the second variable, changed
echo $text2;
?>
# : It is the delimiter for what you want to change.
-=~Splytte~=-

Splytte- Forumotion Member
-

Posts: 737
Age: 22
Language: French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location: Belgium
Country:
Join date: 2006-04-04
Re: Programming Advice
hmm php not my stuff can you give me a example of this
just a reminder
i want the program to behave like this
i enter 'Hi"
it returns "hello" or anything definable
i need it to be capable to store thousands of such combinations
just a reminder
i want the program to behave like this
i enter 'Hi"
it returns "hello" or anything definable
i need it to be capable to store thousands of such combinations

RikaComet- Forumotion Member
-

Posts: 1465
Age: 18
Language: English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location: thing called Earth
Country:
Join date: 2008-09-01
Re: Programming Advice
Your also forgetting Splytte that that code you advised can only be used on a constructed code/website/forum which would also require Javascript in order to function in the first place.
I'll have a snoop around for a code you can actually use.
EDIT: Here is an example of a code that allows you to return predefined text if a certain word is entered, This script is however a SIMPLE version of an example.
Again i made it simple so as not to confuse things, If the user types in 'Hi' the code then returns 'Hello', If they enter anything else apart from 'Hi' it returns 'Hi'
regards
Craig
I'll have a snoop around for a code you can actually use.
EDIT: Here is an example of a code that allows you to return predefined text if a certain word is entered, This script is however a SIMPLE version of an example.
- Code:
<script type="text/javascript">
var text_only = function() {
var retrn = document.getElementById("rtrn");
if (retrn.value == "Hi") {
alert("Hello ...");
return true;
} else {
alert("Hi.");
return false;
}
}
</script>
<form method="GET" action="lookup_rtrnid"
onsubmit="javascript:return text_only();">
Say something: <input type="text" size="7" name="rtrn_id" id="rtrn"></input>
</form>
Again i made it simple so as not to confuse things, If the user types in 'Hi' the code then returns 'Hello', If they enter anything else apart from 'Hi' it returns 'Hi'
regards
Craig
Re: Programming Advice
Well if you don't want it in PHP, I can't really help you sorry
-=~Splytte~=-
-=~Splytte~=-

Splytte- Forumotion Member
-

Posts: 737
Age: 22
Language: French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location: Belgium
Country:
Join date: 2006-04-04
Re: Programming Advice
RikaComet wrote:hmm php not my stuff can you give me a example of this
just a reminder
i want the program to behave like this
i enter 'Hi"
it returns "hello" or anything definable
i need it to be capable to store thousands of such combinations
"Not your stuff", because it was shown in a way that it looks complicated.
If you want to learn PHP, I suggest you this tutorial, even if the English might not be 100% perfect. The way it's explained makes PHP look easier to learn : http://www.newbiesparadise.com/tutorial-3-104-a-dynamic-site-using-php.html
Than, you complete with other sites' tutorials.
Re: Programming Advice
Placehold wrote:Your also forgetting Splytte that that code you advised can only be used on a constructed code/website/forum which would also require Javascript in order to function in the first place.
I'll have a snoop around for a code you can actually use.
EDIT: Here is an example of a code that allows you to return predefined text if a certain word is entered, This script is however a SIMPLE version of an example.
- Code:
<script type="text/javascript">
var text_only = function() {
var retrn = document.getElementById("rtrn");
if (retrn.value == "Hi") {
alert("Hello ...");
return true;
} else {
alert("Hi.");
return false;
}
}
</script>
<form method="GET" action="lookup_rtrnid"
onsubmit="javascript:return text_only();">
Say something: <input type="text" size="7" name="rtrn_id" id="rtrn"></input>
</form>
Again i made it simple so as not to confuse things, If the user types in 'Hi' the code then returns 'Hello', If they enter anything else apart from 'Hi' it returns 'Hi'
regards
so how do use it.. some file can you put it in one?
@cornelia: thanks i knew that site from before when i started learning html
its so cool and easy that mateo guy is awesome
question" i remember that his site was more broad and was a it different looking ..did he renovated it perhaps?

RikaComet- Forumotion Member
-

Posts: 1465
Age: 18
Language: English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location: thing called Earth
Country:
Join date: 2008-09-01
Re: Programming Advice
Cornelia wrote:RikaComet wrote:hmm php not my stuff can you give me a example of this
just a reminder
i want the program to behave like this
i enter 'Hi"
it returns "hello" or anything definable
i need it to be capable to store thousands of such combinations
"Not your stuff", because it was shown in a way that it looks complicated.
If you want to learn PHP, I suggest you this tutorial, even if the English might not be 100% perfect. The way it's explained makes PHP look easier to learn : http://www.newbiesparadise.com/tutorial-3-104-a-dynamic-site-using-php.html
Than, you complete with other sites' tutorials.
Making her surprise appearance is Cornelia.

Xiso- Forumotion Member
-

Posts: 465
Language: English
Country:
Join date: 2009-05-06
Re: Programming Advice
Yep newbies paradize has become v3.0 a few times ago, before it was v2. For French, its siteduzero.com, much more complete.
-=~Splytte~=-
-=~Splytte~=-

Splytte- Forumotion Member
-

Posts: 737
Age: 22
Language: French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location: Belgium
Country:
Join date: 2006-04-04
Re: Programming Advice
ok thanks
for now can some G.Mod temporarily lock this thread
i will have it open when i'm done with php
for now can some G.Mod temporarily lock this thread
i will have it open when i'm done with php

RikaComet- Forumotion Member
-

Posts: 1465
Age: 18
Language: English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location: thing called Earth
Country:
Join date: 2008-09-01
Permissions of this forum:
You cannot reply to topics in this forum
Home




by RikaComet on July 23rd 2009, 10:36 am





» ZA Review
» How do I put threads on my Portal?
» Fiery Hazard Ranks
» Announcement bar not showing
» Special Ranks
» How do i remove the...
» Forum categories -noob qeustion
» How to add a Banner?