Free Skins
© Fisana

Jump to content


My Blog


  • Please log in to reply
96 replies to this topic

#21 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 23 April 2017 - 02:37 AM

Dagnabit ... databases are one of my specialties *sigh*

If you insist on using VB Do NOT go with a relational database that's going to be a freaking mess.

Do you need to include both text AND binary data in each record? 'cuz I remember you wanted to store images.

Unless you write dozens of pages a day I would recommend a simple sequential database consisting of text records with a delimiter with images stored as "image calls" { which would be text defining the image location} and having all images copied into one image directory.

Then since it's a diary, presumably a daily thang, make the daily record identifier something like Day Month Year like 042217 then define a delimiter to divide records as desired. This way you would have one text file for the database and one folder for the images.

Now your database would be something like ...

042217|boring text <image>C:/diary/images/buttkick.gif</image> more boring text|other random bits of data|<end-record>
042317|blah blah <image>C:/diary/images/wedgie.gif</image> more boring text|more random  data|<end-record>
042417|blah blah boooring <image>C:/diary/images/thwack.gif</image> more boring text|other random bits of data|<end-record>
.
.
.

Your display interpreter simply needs to read a record then break the thing apart at the delimiter, read the image tags and grab the image from the location ... easy peasy :yes:

Um yer going to start noticing there's a trend here with things that I mention ... BUT if you recall the webpage I showed you with the Javascript examples I wrote ... um well technically it's a database written in PERL. Only the display is in HTML format ... which like your "Rich Text Layouts" is a type of text formatting ... specifically Hypertext Markup Language. It also happens to be eXactly what you are trying to do ... only in a real language not that silly Micro$soft VB thang :yes:

If you are interested I'll show you the database at that other place but it's a little more complicated than what you need ... same idea though :yes:

Oh and a much easier example is that GhosTalk code I wrote ... if you use the "cookie save" option it creates a little cookie database with date time and data all delimited. When you use the cookie manager thingy I wrote your cookie database is sent over and the manager breaks the records up at the delimiters and sorts everything.

Yeah too much rambling here ... iffen you want I'll show you some examples  ... Oh and that xmas tree decorator ... same idea ... runs off a siguie brand database and builds a big picture ... like I said databases are a specialty :yes:
- siguie -

#22 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 23 April 2017 - 07:30 AM

LOL.... I am, sure, you're swearing? :crazy: Maybe easy peasy for you. I keep getting errors with my database ( do I need some website to make a database :Picture 562: ) VB says I need to download something for Microsoft. When I use their link I get an error.... They use "Data Service" and it asks for a web address, very annoying and I have no idea. And when I was able (by fluke mind you because I had no idea how I did it) to make a; I think local database.....then there are these stupid tables!!! I want to store my text data!!! What am I suppose to store my data in tables? call them, RTF, calendar, time and date thingy and what do I call my welcome page?  I am so past their examples of dogs and cats. And I think I jump around too much. I have like so many projects going :wallbash:  I was just hoping I would put all that crud on a page ( Ok 2 pages) and voilà!!!! But alas not so easy peasy but I have made headway. :confused0068: I have my welcome, cuppa tea and biscuits page, that when I press "enter", does nothing, then I have my 2nd page with a calendar, RICH TEXT BOX so I can add my pictures and, my date and time thingy :innocent0005:  Oh yes and I NEED a search button Posted ImageAnd I think now I need to bind everything or whatever it is called!

Yes please, I would like some examples.... as long as it isn't dogs and cats!

:fighting0072: I know you don't like VB and you say java is easier. But Java was so hard for me, it seems to be all coding. How do you tell if it is right? At least VB has lots of buttons to push and I can see if it sort of works.
Posted Image

Visit us here: Facebook or Twitter

#23 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 23 April 2017 - 03:38 PM

First of all I said Javascript is easy :yes: and Java witch is not even related to Javascript was kinda like C++ and I write cellphone and tablet apps in Java.

<html>
<head>
<title>4 MichaFire</title>
</head>
<body>

<script language="Javascript">
/**************************************************
* author: siguie shortstrider {http://psifly.com} *
***************************************************/
var Word=new Array()
Word[0] = "talk";
Word[1] = "in";
.
.
.
Word[715] = "record";
Word[716] = "end";

var W = Word.length;
var pickWord=Math.floor(Math.random()*W);
function ghost_sez(){document.write(Word[pickWord]);}
ghost_sez();
</script>
<p>
<FORM>
<INPUT TYPE="button" onclick="history.go(0)" VALUE="- Next Word -">
</FORM>
</p>
</body>
</html>

This is the source code for my easiest example :yes:
- siguie -

#24 MacCionoadha BeanSidhe

MacCionoadha BeanSidhe

    Apparition

  • GS Member
  • PipPipPipPipPipPip
  • 3,897 posts
  • Gender:Not Telling
  • Location:Underworld
  • Interests:Meat Loaf(Actor/Singer not the food), Paranormal, Reading, Beading, Baking, Barbecuing, Cooking, Container Gardening and Music.

Posted 23 April 2017 - 03:44 PM

Okay again, with you two, over my head. :huh: :confused: Posted Image

Aquène kah nahonnushagk(Peace and farewell),
WaûtuckquesSóchepo (SnowRabbit)

The Unofficial GhostStudy Easter Bunny


Posted Image


My Shop


#25 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 23 April 2017 - 03:49 PM

Anywho the bits between the script tags is Javascript and the other tags are just remedial html. Oh I removed 712 words to make it more compact here BUT otherwise that's all there is to it :yes:

FYI: I really don't program in Visual Basic :no: and like I mentioned before I don't really know any program languages I just use whatever is available. Once you understand how things work it's just a matter of figuring out the formats and what commands you need to give you the logic flow that you want. :)

View PostMacCGStudy, on 23 April 2017 - 03:44 PM, said:

Okay again, with you two, over my head. :huh: :confused: Posted Image

Hey Klainey now yer talking geekghurl :th_evil:

   Posted Image

Edited by siguie, 23 April 2017 - 03:46 PM.

- siguie -

#26 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 23 April 2017 - 08:21 PM

Java - javascript are they different?... I need to google :confused:

View PostMacCGStudy, on 23 April 2017 - 03:44 PM, said:

Okay again, with you two, over my head. :huh: :confused: Posted Image

It is ok I am not far behind you Mac :)

I will have a look at your example siguie but what gets me is how do you test javascript to see if it works? Ok google here I come, but first a new puzzle :)
Posted Image

Visit us here: Facebook or Twitter

#27 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 23 April 2017 - 09:05 PM

View PostKlaineyGStudy, on 23 April 2017 - 08:21 PM, said:

Java - javascript are they different?... I need to google :confused:



It is ok I am not far behind you Mac :)

I will have a look at your example siguie but what gets me is how do you test javascript to see if it works? Ok google here I come, but first a new puzzle :)

AND yet leaps and bounds ahead :yes: You've gotten the programming bug ... it's a type of computer virus with no cure Posted Image

Just save the file as geekghurl.html to your desktop, edit with Notepad then save and run it with your browser. If you keep your browser and Notepad window both open just hit refresh on the Browser when you've made a change.

Try adding more words to the example for starters so you can see how it works. :yes:

For fun you might try using phrases instead of words. THEN specific speech portions and you can make a faux AI thang :D
- siguie -

#28 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 23 April 2017 - 11:08 PM

My it took me all this time with cuppa breaks and a run into town (Car Not Run) to get my puzzle up Posted Image  Now need to think about dinner, miss lunch as usual :Picture 562:  diary tonight and of course, Facebook, GS and check emails   :th_evil:
Posted Image

Visit us here: Facebook or Twitter

#29 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 24 April 2017 - 06:53 PM

Slacker Posted Image
- siguie -

#30 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 24 April 2017 - 09:03 PM

LOL  I was able today my javascript and get my diary welcome page up

Well that's no good, link didn't work silly me it is on my computer LOL

trust me it works at my end :)

Now to pick your brain siguie... How do I get..... NOW you have to use your imagination... :confused0068: There is a lovely picture pink with a cuppa and biscuits and the header says welcome and there is a button to enter into the diary(Still figuring out how to make the button click to open something up; mind you this took me all day too, and, trust me it looks beautiful)!....Do I make another htlm thingy with my next page( RichText box (hoping this will bypass the insert image thing), calendar, date and whatever buttons happen to work for me) or do I try to cram it all into the one that you needed  your imagination to see because silly me I thought the picture might work! :crazy:
Posted Image

Visit us here: Facebook or Twitter

#31 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 24 April 2017 - 09:49 PM

Oh yeah right that made total sense :yes: :yes: :no:

Um by "button" are you asking for an image that looks like it pushes down or changes colour when you click? AND are you asking for the Javascript answer or VB ... hopefully Javascript 'cuz I haven't used VB in yeeeeaars :no:

You are basically looking at an "onclick Event" https://www.w3school...ent_onclick.asp

Now just to make things more interesting {for me} and more complicated {for you} you can also do "animated" buttons using CSS. That's Cascading Style Sheets, and it can be done as pat of the html code. You 'can' use Javascript or a dozen other options but CSS is quick easy and looks the best with minimal effort which of course why I like it.  https://www.w3school...ate_buttons.asp

Oh and there is also this http://css3buttongenerator.com/
- siguie -

#32 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 24 April 2017 - 09:56 PM

no, i did it in javascript ^_^ see  "click the button'' didn't get any results  NOW "onclick events"  well there you go! I would have come up with that on my own; thanks ^_^

OK I have given myself a headache and I think the start of vertigo :down:  Need to have a laydown :crazy: :yucky:
Posted Image

Visit us here: Facebook or Twitter

#33 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 25 April 2017 - 12:49 AM

View PostKlaineyGStudy, on 24 April 2017 - 09:56 PM, said:

no, i did it in javascript ^_^ see  "click the button'' didn't get any results  NOW "onclick events"  well there you go! I would have come up with that on my own; thanks ^_^

OK I have given myself a headache and I think the start of vertigo :down:  Need to have a laydown :crazy: :yucky:


Of course you would have :yes:

It's in my "easy peasy" example :bunny:


INPUT TYPE="button" onclick="history

Had yerself a nice laydown did you :yes:

Did I mention ... Slacker Posted Image

      Posted Image
- siguie -

#34 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 25 April 2017 - 01:13 AM

I am better now. Sorry, I told you I wasn't good with acronyms but it was funny ( my attempt with RNB)  I laughed when I read your comments and thanks for the info. You must be rolling your eyes. * I also meant to say I wouldn't have worked it out!
Posted Image

Visit us here: Facebook or Twitter

#35 Jim@GhostStudy

Jim@GhostStudy

    Forum Owner

  • Root Admin
  • PipPipPipPipPipPipPipPipPip
  • 9,729 posts
  • Gender:Male
  • Location:Sacramento
  • Interests:Enjoy good people and wholesome activities.

Posted 25 April 2017 - 05:56 AM

This conversaion is completely over my head.

Posted Image
.
Posted Image
Check out the GhostStudy.com "YouTube Channel!" Click here

#36 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 25 April 2017 - 06:06 PM

Nah she's talkin giberish too much geek too soon and she's light headed and tipsy ... just drunk on POWER :yes:
- siguie -

#37 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 25 April 2017 - 07:26 PM

LOL, yeah, a lot of gibber :) Should have seen my code last night this was it and it won't type anything into the text box :(

I know you say stop watching youtube I think I might........nu :bunny: that's the code for a rich text box :confused0068: I know there is a lot of things here I won't need but was worried if I didn't copy correctly it might not work LOL. Silly me didn't work anyway. Here it is:

<!DOCTYPE html>
<html>
<head>
  <title>Rich text editor in js </title>
<script src="https://use.fontawes...9.js"></script>
</head>
<body onload="enableEditMode();">
<div>
<button onclick="execCmd('bold');"><i class="fa fa-bold"></i></button>
<button onclick="execCmd('italic');"><i class="fa fa-italic"></i></button>
<button onclick="execCmd('underline');"><i class="fa fa-underline"></i></button>
<button onclick="execCmd('strikethrough');"><i class="fa fa-strikethrough"></i></button>
<button onclick="execCmd('justifyLeft');"><i class="fa fa-align-left"></i></button>
<button onclick="execCmd('justifyCenter');"><i class="fa fa-align-center"></i></button>
<button onclick="execCmd('justifyRight');"><i class="fa fa-align-right"></i></button>
<button onclick="execCmd('justifyFull');"><i class="fa fa-align-justify"></i></button>
<button onclick="execCmd('indent');"><i class="fa fa-indent"></i></button>
<button onclick="execCmd('outdent');"><i class="fa fa-dedent"></i></button>
<button onclick="execCmd('subcript');"><i class="fa fa-subscript"></i></button>
<button onclick="execCmd('superscript');"><i class="fa fa-superscript"></i></button>
<button onclick="execCmd('insertUnorderList');"><i class="fa fa-list-ul"></i></button>
<button onclick="execCmd('insertOrderList');"><i class="fa fa-list-ol"></i></button>
<button onclick="execCmd('insertParagraph');"><i class="fa fa-paragraph"></i></button>
<button onclick="execCmd('cut');"><i class="fa fa-cut"></i></button>
<button onclick="execCmd('copy');"><i class="fa fa-copy"></i></button>
<button onclick="execCmd('undo');"><i class="fa fa-undo"></i></button>
<button onclick="execCmd('redo');"><i class="fa fa-repeat"></i></button>
<select onchange="execCommandWithArg"('formatBlock', this. value);">
   <option value= "H1">H1</option>
   <option value= "H2">H2</option>
   <option value= "H3">H3</option>
   <option value= "H4">H4</option>
   <option value= "H5">H5</option>
   <option value= "H6">H6</option>
</select>
<button onclick="execCmd('insertHorizontalRuler');">HR</button>
<button onclick="execCommandWithArg('createLink', prompt('Enter a URL', 'http//'));"><i class="fa fa-italic"></i></button>
<button onclick="execCmd('unlink');"><i class="fa fa-unlink"></i></button>
<button onclick="toggleSource();"><i class="fa fa-code"></i></button>
<button onclick="toggleEdit();">Toggle Edit</button>
<br/>
<select onchange="execCommandWithArg"('fontName', this. value);">
   <option value="Arial">Arial</option>
   <option value="Comic Sans MS">Comic Sans MS</option>
   <option value="Courier">Courier</option>
   <option value="Georgia">Georgia</option>
   <option value="Tahoma">Tahoma</option>
   <option value="Times New Roman">Times New Roman</option>
   <option value="Veranda">Veranda</option>
   </select>
   <select onchange="execCommandWithArg('fontSize', this. value);">
   <option value="1">1</option>
   <option value="2">2</option>
   <option value="3">3</option>
   <option value="4">4</option>
   <option value="5">5</option>
   <option value="6">6</option>
   <option value="7">7</option>
   </select>
  Fore Color: <input type="color"onchange="execCommandWithArg"('foreColor', this. value);">
  Background: <input type="color"onchange="execCommandWithArg"('hiliteColor', this. value);">
  <button onclick="execCommandWithArg('insertImage',prompt('Enter the image URL',''));"><i class= "fa fa-file-image-0"></i></button>
  <button onclick="execCmd('selectAll');">Select All</button>


<div>
<iframe name="richTextField" style="width:1000px; height:500px;"></iframe>
<script type="text/javascript">

var showingSourceCode = false;
var isInEditMode = true;

function enableEditMode(){
richTextField.document.designMode ='On';
}
function execCmd (command){
richTextField.document.execCommand(command, false, null);
}
function execCommandWithArg(command, arg){
richTextField.document.execCommand(command, false, arg);
}
function toggleSource(){
if(showingSourceCode)
  richTextField.document.getElementsByTagName('body')[0].innerHTML = richTextField.document.getElementsByTagName('body')[0].textContent;
  showingSourceCode = false;

}else{
richTextField.document.getElementsByTagName('body')[0]. textContent = richTextField.document.getElementsByTagName('body')[0].innerHTML;
showingSourceCode = true;
}
  function toggleEdit(){
   if(isInEditMode) {
   richTextField.document.designMode = 'Off';
   isInEditMode = false;
   }else{
richTextField.document.designMode = 'On';
isInEditMode = true

}

</script>
</body>
</html>

Siguie stick it in your web browser!
Posted Image

Visit us here: Facebook or Twitter

#38 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 25 April 2017 - 10:46 PM

View PostKlaineyGStudy, on 25 April 2017 - 07:26 PM, said:

...

Siguie stick it in your web browser!

I dunno that sounds like an insult Posted Image

Also why are you using an iframe ... shouldn't that be a textarea?

Try replacing ...

<iframe name="richTextField" style="width:1000px; height:500px;"></iframe>

... with ...

<textarea rows="500" cols="1000">Klainey sucks!</textarea>

Depending how your Javascript ilLogic flows you may aslo need Form and Input tags BUT that iframe thang made no sense :no:


Also it wont work ... if you want to show code on a forum you have to use the "code" tags. Certain characters used in coding are stripped and other bits get messed up like there's no way the fontawesome script call is right :no:
- siguie -

#39 KlaineyGStudy

KlaineyGStudy

    Forum Manager

  • Root Admin
  • PipPipPipPipPipPip
  • 3,354 posts
  • Gender:Not Telling

Posted 25 April 2017 - 11:05 PM

LOL I only meant so you can see it isn't working :confused0068: :wallbash: I don't know, I am thinking of my pictures, and not having to save them anywhere other than the diary entry and thought it might work in the Iframe? I don't want to save the pics on my actual computer as individual pics. I know rednotebook can do the text but pics are another thing although I will look at your info again. I suppose I just wanted to do a diary myself :crazy:  The diary I bought had several files of the program but the info and pics were saved into a data base that might be full of individual files and I am sure they are, but I didn't have to manually search for a date or anything. I just needed to hit on the calendar date and the info and pictures are retrieved from the program. My trail is running out soon that's when I will give up on VB. Javascript is another thing :confused0068:
Posted Image

Visit us here: Facebook or Twitter

#40 siguie

siguie

    Earthbound Spirit

  • GS Member
  • PipPipPipPipPip
  • 1,033 posts
  • Gender:Male

Posted 26 April 2017 - 12:46 AM

Yeeeeah about that Javascript is this what you are trying to do 4klainey 'cuz yer kinda doing a lot of werk that has already been done. I mean sure if you are trying to learn code then more power to you BUT if you just want a carp Javascript editor just rip the one from the forum.

Also iffen I wasn't clear Posted Image RNB already does everything you are talking about ... oh here for emphasis Posted Image

  Posted Image

Also um why did you think an iframe was a good idea? Posted Image

Edited by siguie, 26 April 2017 - 12:47 AM.

- siguie -




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users