Latest version broke code
-
I have a snippet that loads at table of amazon links based on a titleid. In a previous version, the following code worked well:
<a href="https://[wbcr_php_snippet id='17166' titleid='8081698']" target="_blank" rel="noopener">Paper:</a>
This applies to the old code at https://mountainsangha.org/products-on-sale. The links to the paper version on amazon are blank (“https://”). This code uses the following snippet, the one referred to above:
global $alinks; echo $alinks[$titleid];
and used to work fine. Now I have to use a new snippet which goes against my sense of “good coding ethics”:
global $alinks, $alink; $titleid; $alink = $alinks[$titleid]; echo "<a href='https://" . $alink . "' target='_blank'>";
Is there something I’m missing? Why doesn’t the first code work?
The page I need help with: [log in to see the link]
- The topic ‘Latest version broke code’ is closed to new replies.