Jump to content

Should I spend 2k$ I don't have making this work??


Telemacus2

Recommended Posts

(note: I did read several posts about bbcode but none of them provides a practical example on how to do it when there's a php plugin involved)

I wasn't going to for a while longer, but since my forum (for some obscure reason) has now been black listed by google as a phising site, I was forced to upgrade my chess site to ipb4.

As expected, my old bbcode no longer works and I'm trying to fix it. The code does include a php plugin. 

Now, since mine is a chess related site, this particular feature is essential. With it, pgn chess code (which looks like this: 

[Date "2017.02.10"]
[White "Anonymous"]
[Black "Anonymous"]
[Result "1-0"]
[WhiteElo "?"]
[BlackElo "?"]
[ECO "C13"]

1. e4 e6 2. d4 d5 3. Nc3 Nf6 4. Bg5 Be7 5. Bxf6 Bxf6 6. Nf3 O-O 7. Qd2 Nc6 8. O-O-O a6 9. h4 dxe4 10. Nxe4 Be7 11. c3 Nb8 12. Bd3 h6 13. Qe3 c6 14. g4 f5 15. Nc5 Bxc5 16. dxc5 Qf6 17. g5 f4 18. Qe4 Qf5 19. Qc4 Qg4 20. Be4 Qg2 21. gxh6 Qxf2 22. Rdg1 Rf7 23. Ne5 Qe3+ 24. Kb1 Re7 25. Ng4 b5 26. cxb6 Qxb6 27. hxg7 Rxg7 28. Bc2 Kf8 29. Qxf4+ Rf7 30. Qh6+ Ke7 31. Rf1 Rxf1+ 32. Rxf1 Kd6 33. Qf4+ Kc5 34. Qd4+ Kb5 35. Qb4# { White wins by checkmate. } 1-0 

is turned into a little chessboard where you can click and see the pieces move on their own to follow the game and some other features. 

I just contacted a coder here at the invison board for some paid help (and whose name I'll keep private (I do have a copy of the email)  as I do not wish to offend anyone, and I'm still trying to recover from the shock!) and his estimate is 

"at least a couple of thousand dollars"

:rofl::rofl:  I've been called a sucker before, but it didn't cost me that much!  (Just for the record, for a previous version of ipb, I got an ipb staff  member to do it for me for free in the past, and another time a coder charged me 50$ to do it. For ipb4, I posted a thread a few days ago requesting an estimate for the job but no coder has replied to it)

Anyway, the code in question is called "pgn4web". Installing it on a forum like phpbb is like this:

integration guidelines

The forum administrator should create a new BBcode with BBcode usage string:

[pgn]{TEXT}[/pgn]

The reccomended value for the HTML replacement string is:

<textarea id='pgn4web_' style='display: none;'>
{TEXT}
</textarea>
<iframe id='pgn4web_board' frameborder='0' width='100%' height='0' scrolling='no' marginheight='0' marginwidth='0'>your web browser and/or your host do not support iframes as required to display the chessboard</iframe>
<script type='text/javascript'>
"use strict";
var pgn4webPath = "/pgn4web";
var pgn4webTextareaIdNum;
if (pgn4webTextareaIdNum === undefined) { pgn4webTextareaIdNum = 1; }
var pgn4webTextareaId = "pgn4web_" + pgn4webTextareaIdNum++;
var pgn4webBoardId = pgn4webTextareaId + "_board";
document.getElementById("pgn4web_").id = pgn4webTextareaId
document.getElementById("pgn4web_board").id = pgn4webBoardId
document.getElementById(pgn4webTextareaId).value = document.getElementById(pgn4webTextareaId).value.replace(/<.*?>/g, ' ');
document.getElementById(pgn4webBoardId).src = pgn4webPath + "/board.html?am=l&d=3000&ss=26&ps=d&pf=d&lcs=TtKN&dcs=LHCg&bbcs=LHCg&hm=b&hcs=mF9_&bd=c&cbcs=RZmI&ctcs=zEtr&hd=j&md=f&tm=13&fhcs=$$$$&fhs=14&fmcs=$$$$&fccs=v71$&hmcs=M___&fms=14&fcs=m&cd=i&bcs=TtKN&fp=13&hl=t&fh=b&fw=p&pi=" + pgn4webTextareaId;
var height = 268;
var multiGamesRegexp = /\s*\[\s*\w+\s*"[^"]*"\s*\]\s*[^\s\[\]]+[\s\S]*\[\s*\w+\s*"[^"]*"\s*\]\s*/m;
if (multiGamesRegexp.test(document.getElementById(pgn4webTextareaId).value)) { height += 34; }
document.getElementById(pgn4webBoardId).height = height;
</script>

Please remember to set the variable pgn4webPath above to the path of the pgn4web folder on your site.

Of course, you need to download the script and copy it into your site, but that's it. 

So,  I tried something like that with ipb.

This is what happens:

Customization->toolbars->add custom button

Name given, adding icon image done.

Type: Not sure, but I understand it's a block, with a chess board and everything.

Option label: I guess this is just like a title for the box the user will get prompting him to enter the pgn code.

And in the text area, I copy paste the same html code as the phpbb.

Save, and sure enough the new button does appear in the menu bars. (but that doesn't men anything of coursE)

Test Result:

I post a message on my forum. 

The pgn button does appear in the editor bar.

I click on it. A pop up window appears prompting me to enter the pgn code.

I do so. click ok.

Strangely, The message does not include anythign. It's like an empty space. I did paste pgn code (I did repeat the test several times)

I add some words to the message.

Press submit.

I get the following error: 

403

Forbidden

Access to this resource on the server is denied!

 

Granted, I'm not much of php guy.

 

 

Link to comment
Share on other sites

5 hours ago, Telemacus2 said:

I just contacted a coder here at the invison board for some paid help (and whose name I'll keep private (I do have a copy of the email)  as I do not wish to offend anyone, and I'm still trying to recover from the shock!) and his estimate is 


"at least a couple of thousand dollars"

:rofl::rofl:  I've been called a sucker before, but it didn't cost me that much!  (Just for the record, for a previous version of ipb, I got an ipb staff  member to do it for me for free in the past, and another time a coder charged me 50$ to do it. For ipb4, I posted a thread a few days ago requesting an estimate for the job but no coder has replied to it)

I am the coder in question and I do not take any offence at all. When you contacted me you talked about installing that script and making it work with Ipb. I thought that you meant a total integration. After reading your thread here, I think that I misunderstood you. And it has nothing to do with you being a sucker or not. Not sure why you felt that way. If you do not agree with a contrator 's price, you are free to look elswhere. No need for the drama.

5 hours ago, iDeath said:

That is a grotesque quote and said coder should be ashamed of such. As for as the 403 that is normally permission issues. Ensure the custom.php has the appropriate chmod(777) permission set.

There is nothing to be ashamed of here. I could have quoted even 2 million (just saying as an example), it is a free economy market and everyone is entitled to charge whatever they want for their work. Like the customer is entitled to accept it or look elsewere. Anyways, just for the record, my price above was based on making a complete integration with ipb. And I am sure, that almost any coder here, will ask more or less the same for that kind of work. 

Link to comment
Share on other sites

@Petja would dislike if I could but for the respect of the OP I'll keep this on topic.

Here's an open source script that looks promising. As far as the structure I'm unsure if you want points to be generated for game wins (like minigame sites) or use forum user accounts as players. This is an easy integration and if I find the time to do so I'll be happy to share at no charge.

PS: If you haven't already, get ip.pages as this would greatly benefit such a request.

Link to comment
Share on other sites

13 hours ago, Petja said:

I am the coder in question and I do not take any offence at all. When you contacted me you talked about installing that script and making it work with Ipb. I thought that you meant a total integration. After reading your thread here, I think that I misunderstood you. And it has nothing to do with you being a sucker or not. Not sure why you felt that way. If you do not agree with a contrator 's price, you are free to look elswhere. No need for the drama.

Yes Petja, I'm free to look elsewhere and that's exactly what I did. I'm also free to explain what happened.

Free economy indeed, but freedom of speech also...

Ideath: Thanks for the suggestion, that's a checkers script. The script I need is specifically chess4web (which is also open source). 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...