Programming Advice
4 posters
Page 1 of 1
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- Active Poster
- Posts : 1536
Reputation : 18
Language : English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location : thing called Earth
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
Guest- Guest
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- Forumember
- Posts : 753
Reputation : 18
Language : French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location : Belgium
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- Active Poster
- Posts : 1536
Reputation : 18
Language : English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location : thing called Earth
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- Forumember
- Posts : 753
Reputation : 18
Language : French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location : Belgium
Re: Programming Advice
what is it actually? mind telling me how it is used?
RikaComet- Active Poster
- Posts : 1536
Reputation : 18
Language : English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location : thing called Earth
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- Forumember
- Posts : 753
Reputation : 18
Language : French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location : Belgium
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- Active Poster
- Posts : 1536
Reputation : 18
Language : English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location : thing called Earth
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
Guest- Guest
Re: Programming Advice
Well if you don't want it in PHP, I can't really help you sorry
-=~Splytte~=-
-=~Splytte~=-
Splytte- Forumember
- Posts : 753
Reputation : 18
Language : French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location : Belgium
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- Active Poster
- Posts : 1536
Reputation : 18
Language : English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location : thing called Earth
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- Forumember
- Posts : 463
Reputation : 1
Language : English
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- Forumember
- Posts : 753
Reputation : 18
Language : French, English, Dutch, Spanish, German, Japanese, Chinese (Beginner).
Location : Belgium
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- Active Poster
- Posts : 1536
Reputation : 18
Language : English , Hindi , Arabic , Urdu, Japenese , Punjabi , German
Location : thing called Earth
Similar topics
» Programming.
» Any Programming Languages?
» A big step in programming on Forumotion!
» logo for programming forum
» I NEED SOME ADVICE??
» Any Programming Languages?
» A big step in programming on Forumotion!
» logo for programming forum
» I NEED SOME ADVICE??
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum