content management [i think] newbie questions?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#16 Post by L18L »

so what?

bugman has a local copy of wordpress "source" :lol:

bugman

#17 Post by bugman »

oh, wordpress

it's like something you tell your kids not to eat

after developing nothing more than a headache this morning, remembered that i'd downloaded the other two

installed joomla, installed drupal

joomla, it's looking a bit like aspirin to me right now, especially like the editing features [like some forums i frequent] and the security stuff [all questions answered] and the documentation and and and

so i'm thinking it's the answer [drupal left me cold]

i apologize to all the small cms devs for ignoring them, but again, the client wants a chevy, even though i may be personally more inclined toward a recumbent bicycle

if that makes any sense . . .

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

chevy

#18 Post by L18L »

So your potential client does not like wordpress anymore?

And if http://www.chevrolet.com/ would be hacked or cracked then any chevy would become insecure?

I have been made translate.g**gle for recumbent bicycle. So I have to thank you for not using basic English or simple English but having contributed something useful for the learners of the English language. :)

bugman

Re: chevy

#19 Post by bugman »

L18L wrote:So your potential client does not like wordpress anymore?

And if http://www.chevrolet.com/ would be hacked or cracked then any chevy would become insecure?

I have been made translate.g**gle for recumbent bicycle. So I have to thank you for not using basic English or simple English but having contributed something useful for the learners of the English language. :)
no, i don't like it any more, that is to say, i do not think it can handle the job - big site, complex requirements

a recumbent bicycle [perhaps i am spelling it wrong] is the kind you lay back in, with the pedals in front - in other words, experimental

i'm hating the world of content management so much [and understanding it so little - i can just make the page look however i want so easily - why do they make it so hard?] that i'm considering not even applying

i know what i know, i do what i do - and this is not it . . .

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

spelling

#20 Post by L18L »

bugman wrote: [perhaps i am spelling it wrong]......
i know what i know,......... - and this is not it . . .
Yes it is!
You have spelled it correctly an g* did translate it correctly :wink:

User avatar
GustavoYz
Posts: 883
Joined: Wed 07 Jul 2010, 05:11
Location: .ar

#21 Post by GustavoYz »

Buggy, be aware of the MySQL bug using Joomla 1.5.xx series (previous). As version 1.6 is too new and some extension has not been ported yet :roll:.
I'm running it locally, just playing with it :P, using latest XAMPP and I've to edit manually the db named 'joomla.sql' into the 'installation' directory to make it run properly
(also have to edit the php.ini file, but if you're using a remote host...:roll:)

Anyway, 1.6 seems better than 1.5.xx...
Best of lucks with it!
8)

bugman

#22 Post by bugman »

meh, i'm just gonna do a really professional, clean standard site, hand-coded for efficiency, same as usual

2 menus for enhanced navigation within sections - there's like 20+ departments and some of them have multiple pages within - so departments in the main menu down the left, pages within departments in a small menu to the right

for the emergency warnings i'm going to write a log-in form page that just generates [and clears] a file for a php include - much simpler than anything i've seen in a cms, no sql either

cheaper and faster too

if they don't like it, fuck 'em, plus the form will be another thing i can use elsewhere, and i'll actually enjoy what i'm doing, as i usually do . . .

bugman

#23 Post by bugman »

update:

have wound up writing two mini cms's for two different websites, both using text files for storage

my next move is to try and figure out how forums such as this one get the markup buttons to work - assuming javascript is involved somehow

don't want to deal with the whole phpbb massive, plus for my clients i think a wysiwyg like vbulletin is better

wondering if just the input part might be floating loose somewhere . . .

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#24 Post by noryb009 »

my next move is to try and figure out how forums such as this one get the markup buttons to work
Post reply -> right click background -> source -> search for bbstyle function
[url=https://github.com/noryb009/lick/releases/latest]LICK - Install Puppy Linux from Windows[/url]

bugman

#25 Post by bugman »

noryb009 wrote:
my next move is to try and figure out how forums such as this one get the markup buttons to work
Post reply -> right click background -> source -> search for bbstyle function
i've done similar here and elsewhere, but am not too sharp on javascript

so the markup buttons can be made without the use of an installed system?

that would certainly make things easier

[edit]

oh, i think it's all starting to make a little more sense to me, despite the early hour and not sleeping in two weeks . . .

thanks!

[re-edit]

so it seems like it's basically javascript makes buttons, buttons cause javascript to add tags to selected [javascript is told what's selected] text, form [which for wysiwyg cannot be standard textarea so is also javascript somehow?] shows results?

once i hit submit and am sending the result back to php-land i'll feel a lot safer :lol:

[building an automobile out of scrap wood]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#26 Post by noryb009 »

Step 1) Add the button. Add this HTML

#########################
<input type="button" class="button" name="addbbcode#" value=" Word(s) on button " style="width: ???px" onclick="bbstyle(#)">
#########################
For example:
#########################
<input type="button" class="button" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)">
#########################

Step 2) Add javascript

#########################

bbcode = new Array();
bbtags = new Array('','','','','[ect]','[/ect]');
imageTag = false;
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
&& (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
&& (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;
var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);

function bbstyle(bbnumber) {
var txtarea = document.TheTextareaEitherByNameOrId;
txtarea.focus();
donotinsert = false;
theSelection = false;
bblast = 0;
if (bbnumber == -1) { // Close all open tags & default button names
while (bbcode[0]) {
butnumber = arraypop(bbcode) - 1;
txtarea.value += bbtags[butnumber + 1];
buttext = eval('document.getElementsByName("addbbcode' + butnumber + '")[0].value');
eval('document.getElementsByName("addbbcode' + butnumber + '")[0].value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
imageTag = false; // All tags are closed including image tags :D
txtarea.focus();
return;
}
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text; // Get text selection
if (theSelection) {
// Add tags around selection
document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
txtarea.focus();
theSelection = '';
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
return;
}
// Find last occurance of an open tag the same as the one just clicked
for (i = 0; i < bbcode.length; i++) {
if (bbcode == bbnumber+1) {
bblast = i;
donotinsert = true;
}
}
if (donotinsert) { // Close all open tags up to the one just clicked & default button names
while (bbcode[bblast]) {
butnumber = arraypop(bbcode) - 1;
txtarea.value += bbtags[butnumber + 1];
buttext = eval('document.getElementsByName("addbbcode' + butnumber + '")[0].value');
eval('document.getElementsByName("addbbcode' + butnumber + '")[0].value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
imageTag = false;
}
txtarea.focus();
return;
} else { // Open tags
if (imageTag && (bbnumber != #OFIMAGETAG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)) { // Close image tag before adding another
txtarea.value += bbtags[#OFIMAGETAG+1];
lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
document.post.addbbcode#OFIMAGETAG.value = "TEXT ON IMAGE BUTTON"; // Return button back to normal state
imageTag = false;
}
// Open tag
txtarea.value += bbtags[bbnumber];
if ((bbnumber == #OFIMAGETAG) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
arraypush(bbcode,bbnumber+1);
eval('document.post.addbbcode'+bbnumber+'.value += "*"');
txtarea.focus();
return;
}
storeCaret(txtarea);
}

#########################

There might be a few errors, I haven't tested it.

bugman

#27 Post by bugman »

i appreciate all that, and will give 'er a go, but it is someone else's code, and i can already tell that it does things i do not need it to do [os/browser detect, they all use win/ie at the office], while at the same time not helping me understand the basic processes of the thing

and i'm not seeing bold() and whatever the <a> javascript function is -- i think i read somewhere that you can create functions in javascript, so i could make them that did classes and ids for css?

[whiney, whiney little bitch that i am]

however, i am pleased to see <input type="button"> as i had not heard of this before; the old wdg html reference i tend to use does not have much detail when it comes to the input tag, and of course does not mention that it can be used as a trigger for javascript events

sorry if i'm asking stupid questions; i've spent the last week learning enough php to build two different content systems -- one with a control panel -- and now having to start learning enough javascript to enable/simplify markup [i have a weird markup system -- markup-defined fields -- for the one system but the other system is writing to pages previously done in <pre> so none needed] is making me a bit crazier than normal, especially as i should be learning arrays to simplify my slightly clunky programming [3500 bytes to process, markup and store 22 fields of text/area could be under a thousand?]

and capable of atrocious paragraphs to boot [swapping out syntax disabilities]

i suppose it might help to know that i am one of those people who can only learn by doing a thing -- and who only wants to know what i need to know [sherlock holmes, the earth and sun revolving?] -- and can only do what i understand, that is, despite my limited knowledge of php i have hand-written oodles of it this week and can explain in english what each bit of it means and how it works -- i do not use comment lines

i've got to go feed cats, and work on my proposal, and do some serious talking to myself [one of my forms of meditation/thinking/learning] about javascript, the language that dare not speak its name . . .

[lobster, can i borrow your loopy smiley?]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#28 Post by noryb009 »

This is much simpler version of the above script. It just adds the text to the end of the textarea:

#######################

<input type="button" value="Bold" onclick="document.getElementById('textarea').value += '[b]'">
<input type="button" value="End Bold" onclick="document.getElementById('textarea').value += '[/b]'">
ect.
<textarea name="textarea" id="textarea"></textarea>

#######################

Then in the PHP code:

#######################

<?php
$textareaText = $REQUEST['textarea'];
$textareaText = preg_replace(array("/\[b\]/","/\[\/b\]/"),
array("<b>","</b>"),
$textareaText);
echo $textareaText;
?>

#######################

first array is ,"/\[codeorwhateverisinbrackets\]/","/\[\/codeorwhateverisinbrackets\]/")
second array is ,"<htmlcode>","</htmlcode>"
[url=https://github.com/noryb009/lick/releases/latest]LICK - Install Puppy Linux from Windows[/url]

bugman

#29 Post by bugman »

wound up using tinymce

[wuss on]

Post Reply