BIDS-collaborative / brainspell

brainspell is a web platform to facilitate the creation of an open, human-curated, classification of the neuroimaging literature
https://gitter.im/BIDS-collaborative/brainspell
2 stars 6 forks source link

Javascript SQL Data #36

Open Sharabesh opened 8 years ago

Sharabesh commented 8 years ago

As we discussed, the SQL data was added to the variable "Test" in the Brainspell.php document using the Str_replace function. All of the code is within lines 1543 and 1610. The dictionaries in the variable can be used, but the location data itself is still nested as a string and needs to be parsed.

Here's my branch with I believe the most updated code https://github.com/Sharabesh/brainspell/tree/Sharabesh_updated

Here's where I set the HTML Variable to an array containing the Database to be parsed in the Javascript https://github.com/BIDS-collaborative/brainspell/compare/BIDS-collaborative...Sharabesh:Sharabesh_updated#diff-256f7777bc064f9f85c8ecb005d3c8abR1596

And here is the variable declaration in Search.html;

https://github.com/BIDS-collaborative/brainspell/compare/BIDS-collaborative...Sharabesh:Sharabesh_updated#diff-4bc774c1cdab1ae9d323d6c298e20ed6R93

davclark commented 8 years ago

@Sharabesh you can always provide a link to the file in the repo. I think your code is here?

https://github.com/BIDS-collaborative/brainspell/blob/BIDS-collaborative/site/php/brainspell.php

You can provide a versioned link by clicking on the history button, then the <> button to view the file at a specific commit, here, I also clicked a line number to link to specific code (generally that's a bad idea for a link to master, as it can change):

https://github.com/BIDS-collaborative/brainspell/blob/7625addc70c9bcf2f8ba59b5d8da7b4ef5ca904a/site/php/brainspell.php#L536

That said, it would be great to get specific pointers... I'm not sure I see your code in the BIDS-collaborative repo. I think the variable is getting set here, for example?

https://github.com/Sharabesh/brainspell/blob/8cca20ef4923fc7950ada3e87c90f8f5d383282f/site/php/brainspell.php#L1596

Let us know where to look! You can also create a pull request in situations like this...

Sharabesh commented 8 years ago

I updated my original comment. Let me know if I should go ahead and add anything else. I'll go ahead and make a pull request as well just to be safe.