1
wizanda
Clever Capture Plan Needs Help
  • 2007/4/5 21:32

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Well since I also got IP banned from XOOPS meant got a bit more work done then usual, and found lots to help us all……..


One of these is the use of <{capture assign=”moduleCSS” name=”style”}>style<{/capture}> which we are not using….

What this will do is capture contents from inside a template and send it to either an assigned variable or a name.
Now this I can do alone on one variable in my header and make multimenu finally 100% w3c with its style in the header as supposed to be….with any styles

Problem is only one item at a time, you cant append to a variable from smarty, only assign it.
It appears that smarty in compiler.php has something called $_capture_ stack, which is an array of all items collected with no where to go….yet.........

So here is my idea at present, since we have Xoops_module_header and this is claiming many of our items, can’t we also use this for the same variables and append $capture_stack to this….


That would mean from then on any time you wanted anything in the header that is not assigned else where with <{capture}> will be automated to the Xoops_module_header and so making additions of CSS and JS in the header easier from then on….

That is if my reading of smarty complier is correct in how it assign the variable, yet it does look this way….

Now I did try doing this slightly…(he says slightly learning)

Anyways findings: template.php doesn’t yet see the complier variables it sees smarty.class, so somewhere (if it is what I think then) if we can get it to go in theme.php it can accompany our header.

Otherwise for multimenu it means making an array somewhere of the variables used for each one and then assigning smarty capture to each then adding these into the header…yet don’t ask me….getting good at reading just not writing yet, with no formal training just learning off everyone else and since now stripped XOOPS that is a lot reading done

So lots of ideas and basic understanding if people can help? maybe we can make some cool features that will save everyone time.

Login

Who's Online

152 user(s) are online (69 user(s) are browsing Support Forums)


Members: 0


Guests: 152


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits